Select a excel file and import and read.

I need select a existing excel file and read using syncfusion. All options are for create excel file.

1 Reply

DJ Davis Jebaraj Syncfusion Team February 28, 2020 05:58 PM UTC

Hi Pedro,

Please refer to this documentation topic:


using (ExcelEngine excelEngine = new ExcelEngine())
{
  //Loads or open an existing workbook
  FileStream inputStream = new FileStream(inputFileName, FileMode.Open);
  IWorkbook workbook = excelEngine.Excel.Workbooks.Open(inputStream);

  //To-Do some manipulation
  //To-Do some manipulation

  //Set the version of the workbook
  workbook.Version = ExcelVersion.Excel2013;

  //Saving the workbook
  FileStream outputStream = new FileStream(outputFileName, FileMode.Create);
  workbook.SaveAs(outputStream);
}

Regards,

Davis


Loader.
Up arrow icon