We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Range.ApplyStyle() on column range massively increased the workbook file size


In Excel, we can choose a whole column and apply a number formatting style, it is fast and does not increase the file size since the one formatting has been applied to the whole column.

However, in Aspose, it was not the case, the file size was increated by more than 100x.

var workbook = new Workbook(@".\test.xlsx");
var columnDRange = workbook.Worksheets[“Sheet1”].Cells.CreateRange(1, 3, 1, 1).EntireColumn;
var style = columnDRange[0, 0].GetStyle();
style.Custom = “##0”%"";
var styleFlag = new StyleFlag();
styleFlag.NumberFormat = true;
columnDRange.ApplyStyle(style, styleFlag);

The file size was 43KB, while after ApplyStyle(), it became 5424KB which made the document not really usable.

If I did the same in Excel, it was only 39KB in the output.

I’ve attached the files for your reference. Could you please help me take a look?

test.zip (1008.0 KB)


We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as
CELLSNET-47205 – Range.ApplyStyle() on column range massively increased the workbook file size

This is to inform you that we have fixed your issue (logged earlier as “ CELLSNET-47205”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.


Please try our latest version/fix: Aspose.Cells for .NET v20.2.3 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells20.2.3 For .Net2_AuthenticodeSigned.Zip (5.2 MB)
Aspose.Cells20.2.3 For .Net4.0.Zip (5.2 MB)


Thanks for the fix! I have tested the version and confirmed the size is now looking normal. I will be waiting for the monthly official release version 20.3.0.

Appreciate the usual efficiency from Aspose.Cells team.


You are welcome

The issues you have found earlier (filed as CELLSNET-47205) have been fixed in Aspose.Cells for .NET v20.3. This message was posted using Bugs notification tool by Amjad_Sahi