Excel en HTML Utiliser l option PresentationPreference pour une meilleure mise en page

Contents
[ ]

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

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Instantiate the Workbook
// Load an Excel file
Workbook workbook = new Workbook(dataDir+ "sample.xlsx");
// Create HtmlSaveOptions object
HtmlSaveOptions options = new HtmlSaveOptions();
// Set the Presenation preference option
options.PresentationPreference = true;
// Save the Excel file to HTML with specified option
workbook.Save(dataDir+ "outPresentationlayout1.out.html", options);