Convert to Spreadsheet
GroupDocs.Conversion can convert any source document to the following spreadsheet formats: Xls, Xlsx, Xlsm, Xlsb, Ods, Ots, Xltx, Xlt, Xltm, Tsc, Xlam, Csv. When just instantiate the SpreadsheetConvertOptions class without specifying the target format explicitly, Xlsx will be used as a default format.
Conversion to spreadsheet format could be triggered by following below steps:
- Create new instance of Converter class and pass source document path as a constructor parameter
- Instantiate SpreadsheetConvertOptions class.
- Call convert method of Converter class instance and pass filename for the converted document and the instance of SpreadsheetConvertOptions from the previous step
The following code show how to convert any document to spreadsheet.
Converter converter = new Converter("sample.docx");
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
converter.convert("converted.xlsx", options);