Free Support Forum -

The new 5.1.0 dll shows the method as obsolete, and says I should now use Workbook(stream,loadoptions). However, intellisense does not give me any clue as to what options I have, and in fact doesn't even recognize that method. The documentation on the website also shows the old method as obsolete, but I can't find any reference to the new method. The examples still show

The save also changed a bit, but intellisense does show the new format and it works ok.

Please explain how to use the new method to open a workbook.



Well, yes, to clean the API Structures and re-organize the API, we have made Workbook.Open() method versions obsolete, but, this method will be eliminated after an year, so, still you may use your existing code (regarding Workbook.Open) the way it is, it will run fine.

But to use it in the new style, see the following segments of code for reference:

FileStream stream = new FileStream(“e:\test\Book1.xlsx”, FileMode.Open);
LoadOptions loadOptions = new LoadOptions(LoadFormat.Xlsx);
Workbook wb = new Workbook(stream,loadOptions);



LoadOptions loadOptions = new

Workbook wb = new Workbook(“e:\test\Book1.xlsx”, loadOptions);



And, we will soon update existing example codes in the docs.

Thank you.