Good Morning Annika,
Thank you for your reply!
With regards to your requests below...
1) I am unfortunately working with client data and therefore I cannot provide a copy of the worksheet we are generating. But what I can tell you is that there are as many rows as I outlined previously but whereas I thought there were only 5 or 6 columns, there is in fact 20 columns. The first 4 of which contain text, while the remaining columns all contain numbers.
2) The OS is Windows 10 Pro, 64-bit and the region setting is Canada.
3) The application I am attempting to use Spire.XLS in is a C# WinForms application in .Net Framework 4.8
I create the object array in memory and populate it, and then I use the InsertArray() to populate the new worksheet. It takes a little time (~3 minutes) but does get past this logic (that I've used elsewhere). It is at this point that I do the following...
- Code: Select all
_currentWorksheet.AllocatedRange.ConvertToNumber();
_currentWorksheet.AllocatedRange.IgnoreErrorOptions = IgnoreErrorType.NumberAsText;
_currentWorksheet.AllocatedRange.NumberFormat = Format;
I have tried to skip this code but I then find we have a performance issue when I try to set the font size & name on the worksheet...
- Code: Select all
_currentWorksheet.AllocatedRange.Style.Font.Size = nFontSize;
_currentWorksheet.AllocatedRange.Style.Font.FontName = fontName;
This process also creates other worksheets for the workbook before this sheet is attempted.
I have created the same document using the Excel interop in under 3 minutes...why is the performance so poor using this library?
The memory usage when using Excel interop never goes above 5GB but when using Spire.XLS I have seen it reach over 40GB with my computer at 99% memory usage.
Do I need to dispose of anything?
Are there best practices when creating worksheets?