function main(spreadsheetReport) {
var sheet = spreadsheetReport.workbook.worksheets.get(0);
if (sheet === "" || sheet === null) {
return;
}
var counts = sheet.cells.maxDisplayRange.columnCount; //获取电子表格列数
sheet.autoFitColumns(0, counts); //从0开始,到counts列结束。
//sheet.autoFitColumn(3); //只对某列进行自适应,第一列为0
}