Convert to Spreadsheet with advanced options

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Conversion MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-conversion -- dnx GroupDocs.Conversion.Mcp --yes
Folders, licensing and more →

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 specifies desired result document type. Available options are: Xls, Xlsx, Xlsm, Xlsb, Ods, Ots, Xltx, Xlt, Xltm, Tsc, Xlam, Csv.
  • setPassword whether the converted document will be password protected with the specified password.
  • setZoom specifies the zoom level in percentage.

The following code snippet shows how to convert to Spreadsheet with advanced options:

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

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