調整行和列的大小

//Set the row "A" height to 15
double rowHeight = 15;
worksheet.Row(1).Height = rowHeight;

//Set the column 1 width to 50
double columnWidth = 50;
worksheet.Column(1).Width = columnWidth;

當 Bestfit 設定為 true 時,當使用者在單元格中輸入數字時,該列將變寬

worksheet.Column(1).BestFit = true;