You can open files of different formats into the Spread for WPF, where you can analyze the data or make any changes. Supported file formats include Excel files and XML data files.
This topic provides the methods for opening several file types.
To open an existing Excel workbook, you can use the OpenExcel method of the GcSpreadSheet class. This method opens the specified Excel in the GcSpreadSheet control and replaces the current workbook with the newly opened workbook.
Refer to the following example code to open an Excel file using a filename.
To load and open an XML data file in a workbook, use the OpenXML method of the IWorkbooks interface which accepts string type filename/stream as its parameter. It returns a new workbook in the same workbook set but does not replace the data of the current workbook. You need to keep the reference to the new workbook to perform further operations.
The following example code opens an XML data file using a filename.