Conversion Excel en HTML Utiliser l option PresentationPreference pour une meilleure disposition avec Node.js via C++

Contents
[ ]

Veuillez voir le code d’exemple ci-dessous qui démontre comment rendre un fichier HTML à partir d’un rapport Excel avec la préférence de présentation activée.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Instantiate the Workbook
// Load an Excel file
const workbook = new AsposeCells.Workbook(path.join(dataDir, "sample.xlsx"));

// Create HtmlSaveOptions object
const options = new AsposeCells.HtmlSaveOptions();
// Set the Presentation preference option
options.setPresentationPreference(true);

// Save the Excel file to HTML with specified option
workbook.save(path.join(dataDir, "outPresentationlayout1.out.html"), options);