【发布时间】:2016-10-06 22:05:22
【问题描述】:
我将 C# 用于 VSTO Excel 插件。
目前我正在将列设置为自动安装:
newWorkSheet.Columns.AutoFit();
如何将列宽设置为有一些额外的填充?
在伪代码中是:
Column.Width = columnCurrentWidth + 10
对于某一列,使其比自动调整宽度稍宽
我已经弄清楚如何获取列的宽度但没有设置它
int width = ((Excel.Range)newWorkSheet.Cells[rowCount, 2]).Width;
【问题讨论】: