Now I'm using
- Code: Select all Expand view
- [code]oSheet:Columns( "A:ZZ" ):AutoFit()[/code]
to set the autofit.
Is it possible to give instead of "A:ZZ" the range with numbers?
Now I have to calculate the range to convert it to characters.
[code]oSheet:Columns( "A:ZZ" ):AutoFit()[/code]
Marc Vanzegbroeck wrote:Hi,
Now I'm using
- Code: Select all Expand view
[code]oSheet:Columns( "A:ZZ" ):AutoFit()[/code]
to set the autofit.
Is it possible to give instead of "A:ZZ" the range with numbers?
Now I have to calculate the range to convert it to characters.
numRows := oWorkBook:workSheets( 1 ) :usedRange:Rows:Count
numColumns := oWorkBook:workSheets( 1 ) :usedRange:Columns:Count
// Speed things up by creating an object containing the cells
oSheet := oExcel:Worksheets( 1 ) :cells
// fit all Column to optimal size
oSheet:EntireColumn:AutoFit()
oSheet:Columns( "A:ZZ" ):Set( "NumberFormat", '@' )
Marc Vanzegbroeck wrote:Jimmy,
Thank you for your answer.
Indeed, I can use oSheet:EntireColumn:AutoFit() for the complete excel, but what If I want to do it for column 1 to 30?
Another example is if I want to set the cell-format for only column 1 to 30
- Code: Select all Expand view
oSheet:Columns( "A:ZZ" ):Set( "NumberFormat", '@' )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 109 guests