Could you explain me, I make excel file from datatable using npoi. Could I expand columns when file opens to header content lengths.
using (FileStream fs = System.IO.File.Create(FileName))
{
workbook.Write(fs);
}
Could you explain me, I make excel file from datatable using npoi. Could I expand columns when file opens to header content lengths.
using (FileStream fs = System.IO.File.Create(FileName))
{
workbook.Write(fs);
}
please try AutoSizeColumn
to set Autosize to all columns.
mySheet.AutoSizeColumn(columnIndex)
please check
“AutoSize” to Excel sheet column? (NPOI)
and