設定されている内容から最大幅を取得
float floWidth = sprExcel.Sheets[0].GetPreferredColumnWidth(列No); if (sprExcel.Sheets[0].Columns.Get(列No).Width < floWidth) { sprExcel.Sheets[0].SetColumnWidth(列No, (int)floWidth); }
float floWidth = sprExcel.Sheets[0].GetPreferredColumnWidth(列No); if (sprExcel.Sheets[0].Columns.Get(列No).Width < floWidth) { sprExcel.Sheets[0].SetColumnWidth(列No, (int)floWidth); }