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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Open csv and save as xlsx

Thread ID:

Created:

Updated:

Platform:

Replies:

121621 Jan 8,2016 12:29 PM UTC Jan 11,2016 06:30 AM UTC UWP 2
loading
Tags: XlsIO
andy-dev
Asked On January 8, 2016 12:29 PM UTC

Hi

Im using Syncfusion for the first time, and i Need to open a csv file and save it as xlsx. When the file is saved, it cant opened with MS Excel 2013, ist being corrupt. My Code below:


ExcelEngine excelEngine = new ExcelEngine();

IApplication application = excelEngine.Excel;

IWorkbook workbook = await application.Workbooks.OpenAsync(myCSVFile, ",");

StorageFile myXLSXFile = await localFolder.CreateFileAsync("file.xlsx", CreationCollisionOption.ReplaceExisting);

await workbook.SaveAsAsync(myXLSXFile);

workbookToExport.Close();

excelEngine.Dispose();


What did i made wrong?


andy-dev
Replied On January 8, 2016 01:07 PM UTC

I found the issue, i had to set the Version

workbookToExport.Version = ExcelVersion.Excel2013;


Dilli Babu Nandha Gopal [Syncfusion]
Replied On January 11, 2016 06:30 AM UTC

Hi Andy,

We are glad to know that your issue has been resolved. Please let us know if you need any clarification.

Regards,
Dilli babu.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;