# Load Spreadsheet document with options Learn this article and check how to load and convert Microsoft Excel and Open Document spreadsheets with advanced options using GroupDocs.Conversion for .NET API. [**GroupDocs.Conversion**](https://products.groupdocs.com/conversion/net) provides the [SpreadsheetLoadOptions](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions) class which controls how the source spreadsheet will be processed. Below are some of the load options that you can use while [converting spreadsheets]({{< ref "conversion/net/developer-guide/basic-usage/convert/spreadsheet" >}}): | Option | Description | |--------|-------------| |**[Format](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/format)** | 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* | |**[AllColumnsInOnePagePerSheet](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/allcolumnsinonepagepersheet)** | 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. | |**[AutoFitRows](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/autofitrows)** | If enabled, automatically adjusts the content of all rows while converting. | |**[CheckExcelRestriction](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/checkexcelrestriction)** | Whether to check restrictions of Excel file when modifying cell objects. | |**[ConvertRange](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/convertrange)** | Defines a specific range of cells to be converted. For example: "D1:F8" | |**[CultureInfo](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/cultureinfo)** | Specifies system culture info at the time file is loaded. | |**[DefaultFont](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/defaultfont)** | Specify the default font to use if a spreadsheet font is missing. | |**[FontSubstitutes](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/fontsubstitutes)** | Substitute specific fonts from the source spreadsheet. | |**[PrintComments](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/printcomments)** | Specifies how comments are printed with each sheet: *PrintNoComments* (default, comments are not printed), *PrintInPlace*, *PrintSheetEnd*, or *PrintWithThreadedComments*. | |**[OnePagePerSheet](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/onepagepersheet)** | If specified, each spreadsheet will be converted into a single page. | |**[OptimizePdfSize](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/optimizepdfsize)** | If enabled, optimizes the resulting PDF for smaller file size, rather than for better print quality. | |**[Password](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/password)** | Defines a password to unlock a protected document. | |**[SheetIndexes](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/sheetindexes/)** | Defines the indexes of the particular sheets to be converted. | |**[Sheets](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/sheets/)** | Defines the names of the particular sheets to be converted. | |**[ShowGridLines](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/showgridlines)** | Specify if the grid lines should be visible. | |**[ShowHiddenSheets](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/showhiddensheets)** | Specify if the hidden sheets should be included in the converted document. | |**[SkipEmptyRowsAndColumns](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/skipemptyrowsandcolumns)** | Specify if empty rows and columns should be ignored. | |**[ColumnsPerPage](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/columnsperpage)** | Specifies the number of columns to include on each page when converting large spreadsheets. | |**[RowsPerPage](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/rowsperpage)** | Specifies the number of rows to include on each page when converting large spreadsheets. | |**[SkipHeaders](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/skipheaders)** | Specifies the number of header rows to skip during conversion. | |**[SkipFooters](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/skipfooters)** | Specifies the number of footer rows to skip during conversion. | |**[IgnoreFormulaCalculationErrors](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/ignoreformulacalculationerrors)** | If *true*, ignores errors that occur during formula calculation. Useful for spreadsheets with broken or external references. | |**[ExternalResourceHandler](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/externalresourcehandler)** | 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. | |**[SkipExternalResources](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/skipexternalresources)** | 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]({{< ref "conversion/net/developer-guide/advanced-usage/loading/skip-external-resources.md" >}}). | |**[WhitelistedResources](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/whitelistedresources)** | 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: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { PrintComments = SpreadsheetPrintComments.PrintSheetEnd, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` ### Show grid lines The following code snippet shows how to convert a spreadsheet and show grid lines: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { ShowGridLines = true, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` ### Skip empty rows and columns The following code snippet shows how to convert a spreadsheet and skip empty rows and columns: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { SkipEmptyRowsAndColumns = true, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` ### Specify font substitution The following code snippet shows how to convert a spreadsheet and specify font substitution for missing fonts: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { DefaultFont = "Helvetica", FontSubstitutes = new List { FontSubstitute.Create("Tahoma", "Arial"), FontSubstitute.Create("Times New Roman", "Arial"), }, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); 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: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { Sheets = new[] {"Expenses", "Taxes" }, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` The following code snippet shows how to convert a spreadsheet and specify the desired sheets by their zero-based indexes: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { SheetIndexes = new[] { 0, 2 }, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` ### Specify range The following code snippet shows how to convert a spreadsheet and specify the exact range of rows and columns to be converted: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { ConvertRange = "10:30", OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` ### Include hidden sheets The following code snippet shows how to convert a spreadsheet including the hidden sheets: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { ShowHiddenSheets = true, OnePagePerSheet = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ``` ### Automatically fit rows To fit the row content of all rows while converting from a spreadsheet, set the [AutoFitRows](https://reference.groupdocs.com/conversion/net/groupdocs.conversion.options.load/spreadsheetloadoptions/autofitrows/) property to `true`: ```csharp Func getLoadOptions = loadContext => new SpreadsheetLoadOptions { AutoFitRows = true }; using (Converter converter = new Converter("sample.xlsx", getLoadOptions)) { PdfConvertOptions options = new PdfConvertOptions(); converter.Convert("converted.pdf", options); } ```