High memory usage

Hello everyone.
First I apologize if I'm duplicating any post. I really didn't find the right words to find the answer I need.
I am using FlexCel to generate a really very large .xlsx file. But this is allocating a lot of memory and in some cases crashing the computer. The mass of data I have in my dataset is about 500 MB, but as I move to the TExcelFile object, the memory keeps increasing. My virtual machine is 6 GB, which is not enough even with the page file (which was about 13 GB before it crashed).
I don't understand why he occupies all this memory.
Would there be another way to do what I need? Maybe a way to write to disk directly instead of allocating everything in memory to write to disk only in the end? Forgive me if I don't use the proper technical terms for what I'm trying to describe. I would appreciate it if someone could help me.

Sorry, I was logged in into a different user (we were investigating some login issues he had), so the post went with the wrong author. I deleted it and I am now reposting it as myself :)


Hi,
FlexCel uses about the same memory as Excel itself when loading the file, so if it is taking too much memory, it might be an interesting idea to reduce the size (maybe use 2 different files), or it might also crash for the people opening the files in Excel.

Does the file have a lot of formulas? That consumes a lot of memory. Also how many rows/columns/sheets are you generating?

Finally, remember that if your app is 32 bit it will never use more than 2GB of ram, even if you have 6GB available.

This all being said, it might be something with the particular file, since we deal here a lot with huge files, and it is rare to see a memory problem. If you want, you can upload the file to some service like onedrive or dropbox, and email me the link to adrian@tmssoftware.com and I can investigate if there is something wrong with that particular file.

Hi, Adrian.

Please ignore what I wrote before. I have some memory issues in a legacy application and ended up not parsing the code correctly (which is pretty confusing). I did some separate testing with your component and didn't find the problem I had described. I'm sorry for this. Your component is great. I won't waste your time answering the questions you asked. Thanks for the reply and trying to help me. And, once again, I apologize for my misinterpretation.