Skip to content Skip to sidebar Skip to footer

How To Control Excel Column Size In Javascript?

I have a function in Javascript that Exports data to a new Excel file. I'm using ActiveXObejct('Excel.Application') to work with Excel. After The Export of the data is done and I s

Solution 1:

After the loop:

Sheet.Cells(,1).EntireColumn.ColumnWidth = 20

will change the width of column A.


Solution 2:

I've managed to find an answer.

Sheet.ActiveSheet.Cells('A:A').ColumnWidth=11;

This will change the width of the first cloumn.


Post a Comment for "How To Control Excel Column Size In Javascript?"