Hi there,
using Infragistics Ultimate for Winforms v20, I generate an Excel Workbook from a SQLreader. This works fine, but the file might get quite big (some 100 MB). so populating all the data in memory and then saving the file in one write operation at the end is quite RAM-expensive.
Is there a way to save the the file "as of now", similar to the "Save" (not "Save as") command in Excel itself? Say, I'd save every 10000 rows? The Workbook.Save takes a filename and overwrites the file... Or did I miss a detail in the overloads?
ThanksMartin
Hello and thank you for contacting Infragistics. The Save method can be used to save to a stream. I recommend seeing the remarks in our API docswww.infragistics.com/.../infragistics.documents.excel~infragistics.documents.excel.workbook~save(string,workbooksaveoptions)
eg. I found some unrelated posts that may help
https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/109029/save-xlsx-files-to-a-memory-stream
https://es.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/55377/excel-workbook-save-methos-to-save-in-memory-stream
Note, there is no save vs save as in terms of the workbook. you are always just saving to a stream. whether you are overwriting an existing filestream or creating a new filestream (or whatever type of stream). Typically when you are writing to a file that exists and you want to overwrite it you would use the filemode of Create so that it overwrites the existing file.learn.microsoft.com/.../system.io.filemode