The document type is auto-detected while loading. However, you can explicitly specify the type of the source spreadsheet document. Available options are: Csv, Fods, Ods, Ots, Tsv, Xlam, Xls, Xlsb, Xlsm, Xlsx, Xlt, Xltm, Xltx
If true, all column content from a single sheet will be converted into a single page. The width of paper size of page setup will be ignored, while keeping the rest of page settings.
Specifies how comments are printed with each sheet: PrintNoComments (default, comments are not printed), PrintInPlace, PrintSheetEnd, or PrintWithThreadedComments.
A handler called for each resource the document asks to load; it can allow the resource, skip it or supply its content. Default: null. Available since version 26.10.
Whether to skip the external resources the document references. Default: true. Content the document carries, local files inside its folder and resources that match WhitelistedResources still load. See Skip loading of external resources.
Absolute URI prefixes, such as https://cdn.example.com/assets/, of external resources to load while SkipExternalResources is true. Since version 26.10, an entry that is not an absolute URI prefix makes the load fail with InvalidLoadOptionsException.
Show or hide comments
By default, comments are not printed (SpreadsheetPrintComments.PrintNoComments). The following code snippet shows how to convert a spreadsheet and print its comments at the end of each sheet:
The following code snippet shows how to convert a spreadsheet and specify font substitution for missing fonts:
Func<LoadContext,LoadOptions>getLoadOptions=loadContext=>newSpreadsheetLoadOptions{DefaultFont="Helvetica",FontSubstitutes=newList<FontSubstitute>{FontSubstitute.Create("Tahoma","Arial"),FontSubstitute.Create("Times New Roman","Arial"),},OnePagePerSheet=true};using(Converterconverter=newConverter("sample.xlsx",getLoadOptions)){PdfConvertOptionsoptions=newPdfConvertOptions();converter.Convert("converted.pdf",options);}
Specify particular sheets
You can specify the sheets to be converted either by names or by indexes.
The following code snippet shows how to convert a spreadsheet and specify the desired sheets by their names: