Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Excel to HTML in Node.js
var aspose = aspose || {};
aspose.cells = require("aspose.cells");
// Load workbook
var workbook = aspose.cells.Workbook("workbook.xlsx");
// Create HTML options and enable grid lines
var options = aspose.cells.HtmlSaveOptions();
options.setExportGridLines(true);
// Save XLSX as HTML
workbook.save("D:\\xlsx-to-html.html", options);
var aspose = aspose || {};
aspose.cells = require("aspose.cells");
// Load workbook
var workbook = aspose.cells.Workbook("workbook.xlsx");
// Create HTML options and enable exporting hidden sheets
var options = aspose.cells.HtmlSaveOptions();
options.setExportHiddenWorksheet(true);
// Save XLSX as HTML
workbook.save("D:\\xlsx-to-html.html", options);
var aspose = aspose || {};
aspose.cells = require("aspose.cells");
// Load workbook
var workbook = aspose.cells.Workbook("workbook.xlsx");
// Create HTML options and enable tooltip
var options = aspose.cells.HtmlSaveOptions();
options.setAddTooltipText(true);
// Save XLSX as HTML
workbook.save("D:\\xlsx-to-html.html", options);
var aspose = aspose || {};
aspose.cells = require("aspose.cells");
// Load workbook
var workbook = aspose.cells.Workbook("workbook.xlsx");
// Save XLSX as HTML
workbook.save("D:\\xlsx-to-html.html");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment