Forum Discussion
Patrick_virtualFD
Jan 18, 2023Brass Contributor
Office script version of VBA for column autofit?
hi everyone, Do you know if there's a way to mimic the behaviour of the VBA command cells.entirecolumn.autofit using Office Script? I've managed to get this behaviour on a particular table (a...
- Feb 03, 2023You can use something like:
selectedSheet.getRange("D8:J8").getFormat().autofitColumns();
See:
https://learn.microsoft.com/en-gb/office/dev/scripts/tutorials/excel-read-tutorial
wma1840
Feb 03, 2023Copper Contributor
You can use something like:
selectedSheet.getRange("D8:J8").getFormat().autofitColumns();
See:
https://learn.microsoft.com/en-gb/office/dev/scripts/tutorials/excel-read-tutorial
selectedSheet.getRange("D8:J8").getFormat().autofitColumns();
See:
https://learn.microsoft.com/en-gb/office/dev/scripts/tutorials/excel-read-tutorial