Use GroupDocs.Markdown to convert XLSX and other spreadsheet files to Markdown tables. You can control how many columns and rows are included using spreadsheet-specific options.
Using static method
The simplest way to convert a spreadsheet file:
usingGroupDocs.Markdown;// Set license (optional)if(File.Exists("GroupDocs.Markdown.lic"))License.Set("GroupDocs.Markdown.lic");// Convert XLSX to Markdown stringstringmarkdown=MarkdownConverter.ToMarkdown("cost-analysis.xlsx");// Or save directly to a fileMarkdownConverter.ToFile("cost-analysis.xlsx","export-spreadsheet-static.md");
cost-analysis.xlsx is a sample file used in this example. Click here to download it.
For more control, use the instance API. The ConvertOptions class provides spreadsheet-specific properties such as MaxColumns and MaxRows to limit the size of the exported tables: