anserkk wrote:Di you try
- Code: Select all Expand view
oSheet:Cells:EntireColumn:AutoFit
The above code should AutoFit All Columns on the Worksheet
oSheet:Cells:EntireColumn:AutoFit
[code]oSheet:Columns( "A:ZZ" ):AutoFit()[/code]
nageswaragunupudi wrote:It may be easier to do something like this:
oCol:nWidth := oBrw:GetWidth( "這是一個句子". oFont )
You may also try
oCol:AutoFit()
or
oBrw:AutoFit()