puripats's avatar
puripats
Copper Contributor
Feb 15, 2024
Status:
New

OfficeJS API to provide method to set ColumnWidth as Character the same way as Excel UI

Now we have this method
For Example,

await Excel.run(async context => {
const rangeAreas = context.workbook.getSelectedRanges();
rangeAreas.load('format/columnWidth');
rangeAreas.format.columnWidth = 50

await context.sync();

})


On the Excel UI itself we can set the number as 'Characters' 
however, this method we set as 'Magic Number' 

The idea is, It's better if we have option to set,
rangeAreas.format.columnWidth by 'Characters' which is provide by Excel UI itself. but we do not have this method on API

No CommentsBe the first to comment