Convert to Spreadsheet with advanced options

GroupDocs.Conversion provides SpreadsheetConvertOptions to give you control over conversion result when convert to spreadsheet format. Along with common convert options from base class SpreadsheetConvertOptions has the following additional options:

  • setFormat -  desired result document type. Available options are: Xls, Xlsx, Xlsm, Xlsb, Ods, Ots, Xltx, Xlt, Xltm, Tsc, Xlam, Csv
  • setPassword - if set, the converted document will be password protected with the specified password
  • setZoom - specifies the zoom level in percentage

Following code snippet shows how to convert to Spreadsheet with advanced options

Converter converter = new Converter("sample.docx");
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
options.setPageNumber(2);
options.setPagesCount(1);
options.setFormat(SpreadsheetFileType.Xls);
options.setZoom(150);

converter.convert("converted.xls", options);