-1

I am calling the xlCreateBook() function. Before that my program holds more memory because i am reading a huge file. After called the xlCreateBook() it returns the null pointr to the Sheet variable.

But once i loaded the less size file it xlCreateBook() functions working correctly. Help me to get out of this.

Prakash
  • 11
  • 3
  • How do you want us to help you if you don't put your code ? Please read [Stack Overflow's Tour](https://stackoverflow.com/tour) and [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) – Xatyrian Aug 18 '17 at 09:45

1 Answers1

0

Which method returns a null pointer? AddSheet()? It's strange that it would be related to size to write, since at the sheet creation, you have not added data yet. What does Book::errorMessage() say when you get a null sheet pointer?

Maybe what you are trying to save is too big for the old xls format, and you should create an xlsx file, by using xlCreateXMLBook() instead?

If you really are lacking memory because of something else, there is not much that can be done by software if you lack physical memory. Except detecting it and returning a 'clean' error

bartoli
  • 173
  • 8