Json with Node.js via C++
Convert Excel Workbook to JSON
The Aspose.Cells API provides support for converting spreadsheets to JSON format. To export the workbook to JSON, pass SaveFormat.Json as the second parameter of Workbook.save(string, SaveFormat) method. You may also use JsonSaveOptions class to specify additional settings for exporting worksheet to JSON.
The following code example demonstrates exporting the active worksheet to JSON by using SaveFormat.Json enumeration member. Please see the code to convert source file to the output Json file generated by the code for reference.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Load your source workbook
const workbook = new AsposeCells.Workbook(filePath);
// Convert the workbook to json file.
workbook.save(path.join(dataDir, "book1.json"));