fpSpread1.ActiveSheet.Columns.Count = 13;
var width = 0F;
var count = fpSpread1.ActiveSheet.Columns.Count;
for (int i = 0; i < fpSpread1.ActiveSheet.Columns.Count; i++)
{
width += (fpSpread1.ActiveSheet.Columns[i].Width + 2);
}
if (width < fpSpread1.Width)
{
fpSpread1.ActiveSheet.Columns[count - 1].Width += (fpSpread1.Width - width - fpSpread1.ActiveSheet.RowHeader.Columns[0].Width);
}
|