How to Use AutoFit()

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to put a long string into a cell but i want it shown in a proper way
so that the user can see the whole content with proper width and height. Can
I use AutoFit() to adjust individual cell width and height? How can I do
that?

excelresultsheet.Cells(i+1,j+1).value=value[j];

As you can see, excelresultsheet is a worksheet type and value[j] are a long
string. I am using Java Script. Thanks a lot.

Weide
 
you can do rows and columns,

With Rows(1)
.HorizontalAlignment = xlCenter
.Font.Size = 8.5
.AutoFit
End With

and

With Columns("E:F")
.AutoFit
End With
 
Hi,

Can you tell me how I could apply the method on the "cells", which is the
member variable of the active work sheet. In javascript, I am able to use
cells[j] to access a specific cell. But i dont know how to use AutoFit on
individual cell? Which type of object can call AutoFit ? Thanks a lot.

Weide

Gary Keramidas said:
you can do rows and columns,

With Rows(1)
.HorizontalAlignment = xlCenter
.Font.Size = 8.5
.AutoFit
End With

and

With Columns("E:F")
.AutoFit
End With

--


Gary


Weide Zhang said:
I need to put a long string into a cell but i want it shown in a proper way
so that the user can see the whole content with proper width and height. Can
I use AutoFit() to adjust individual cell width and height? How can I do
that?

excelresultsheet.Cells(i+1,j+1).value=value[j];

As you can see, excelresultsheet is a worksheet type and value[j] are a long
string. I am using Java Script. Thanks a lot.

Weide
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top