Unplanned
Last Updated: 04 Aug 2017 15:03 by ADMIN
ADMIN
Deyan
Created on: 04 Aug 2017 15:02
Category: SpreadProcessing
Type: Bug Report
0
SpreadProcessing: Column widths are wrongly always exported with value 65 when they are not marked as custom
There are scenarios when the default value of the columns is changed and may be different from 65. However, RadSpreadprocessing always exports the non-custom column values as 65.

WORKAROUND: After importing the XLSX file you may make all columns to have custom values in order to preserve the column widths after the export. The following code snippet shows how this may be achieved for some Worksheet instance:

CellRange usedRange = worksheet.UsedCellRange;

for (int i = 0; i < usedRange.ColumnCount; i++)
{
    ColumnSelection column = worksheet.Columns[i];
    double width = column.GetWidth().Value.Value;
    column.SetWidth(new ColumnWidth(width, true));
}
0 comments