We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Open new xls instance

Hi, I am trying to open a new instance of Excel before exporting data to this instance, and apparently I have not seen any properties that helps to do that. All the codes are about opening an existing file, or save the changes to a new file, I would like to open a new file, perform the export (this part is performing well), leaving an unsaved file. Thanks in advance - Nicolas

3 Replies

AV Abirami Varadharajan Syncfusion Team September 19, 2016 11:25 AM UTC

Hi Nicolas, 
Thank you for contacting Syncfusion support.  
You can create a new Excel document with the below code snippet. 
Code Snippet: 
application.DefaultVersion = ExcelVersion.Excel2013; 
IWorkbook workbook = application.Workbooks.Create(1); 
Please let us know if you have any concerns. 

NI Nicolas September 19, 2016 11:56 PM UTC

Hi I already tried that, but did not worked for me, however I found a workaround by saving the file in a temporary folder and opened this file - Thank you! - Nicolas

AV Abirami Varadharajan Syncfusion Team September 20, 2016 11:20 AM UTC

Hi Nicolas, 
We are glad that your issue is resolved through a workaround. 
You can also save the workbook to a stream and reopen it whenever needed. 

Live Chat Icon For mobile
Up arrow icon