全选所有列再调用AutoFit:
//auto adjust column width (according to content) Range allColumn = xlWorkSheet.Columns; allColumn.AutoFit();
全选所有列再调用AutoFit:
//auto adjust column width (according to content) Range allColumn = xlWorkSheet.Columns; allColumn.AutoFit();