Add notes to cell on big Excel file

1 Answer 83 Views
SpreadProcessing SpreadStreamProcessing
Claude
Top achievements
Rank 1
Claude asked on 09 Feb 2023, 11:16 PM

Hi,

I'm using IWorksheetExporter (Telerik.Documents.SpreadsheetStreaming library)  to create big Excel files, ~400 mb xlsx.

I need to add notes to header cells like what is available here https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/notes but it doesn't look to be available in the Streaming library.

I see two possible workarounds.

  1. Create my header row with RadSpreadProcessing and reopen the same file for the batch processing with the streaming dll. But I can't find how to append to a worksheet, the only thing that looks like appendable to an existing file is new worksheet.
  2. Create the big file with the streaming library and reopen it with RadSpreadProcessing to add the notes. What will be the performance hit to do that? Does opening an excel file load everything in memory? So saving it back will also recreate the whole file?
  3. Do you have another solution

NB. Trying to completely create this file via the RadSpreadProcessing library throw a "Stream was too long" from within the library while saving it.

NB. I'm using the latest version from the nuget stream.

Thanks

1 Answer, 1 is accepted

Sort by
0
Nikolay Demirev
Telerik team
answered on 13 Feb 2023, 09:57 AM

Hi Claude,

That large file can be created only using the SpreadStreamProcessing library. It only stores an insignificant amount of the document data in the memory and tries to write the document contents as soon as they are fully defined. This way, exporting documents is fast and with a small memory footprint. On the other side is the RadSpreadProcessing, which first creates the Document Object Model in the memory and then exports it to a file. Storing the DOM in the memory makes it slower for export but allows more complex features to be implemented, like formula calculations.

Currently, only the SpreadProcessing supports Comments and Notes and appending data to existing worksheets. While the SpreadStreamProcessing can only append new sheets to an existing Workbook.

 

I could suggest you two options for exporting the documents:

1. Try splitting the document into multiple workbooks, so each file you export is smaller, and use the SpreadProcessing library to add Notes.

2. Add the note to a new column next to the one with the data and use the SpreadStreamProcessing.

 

I know this is a limitation, but there were no requests for adding Notes to documents generated with SpreadStreamProcessing. I have logged it as a feature request in our Public portal on your behalf. Please follow it to be notified when there is an update about its progress.

Would you please let me know if you have any additional questions?

Regards,
Nikolay Demirev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
SpreadProcessing SpreadStreamProcessing
Asked by
Claude
Top achievements
Rank 1
Answers by
Nikolay Demirev
Telerik team
Share this question
or