Excel to HTML Utilizzare l Opzione PresentationPreference per una Migliore Layout
Contents
[
Hide
]
Aspose.Cells fornisce una proprietà utile, HtmlSaveOptions.PresentationPreference, che gli sviluppatori possono utilizzare per ottenere una migliore disposizione quando si salvano un file Microsoft Excel in formato HTML o MHT. Il valore predefinito della proprietà è false. Consigliamo di impostare questa proprietà su true per ottenere presentazioni più belle da un report Excel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(ExceltoHTMLPresentationPreferenceOption.class); | |
// Instantiate the Workbook | |
// Load an Excel file | |
Workbook workbook = new Workbook(dataDir + "HiddenCol.xlsx"); | |
// Create HtmlSaveOptions object | |
HtmlSaveOptions options = new HtmlSaveOptions(); | |
// Set the Presenation preference option | |
options.setPresentationPreference(true); | |
// Save the Excel file to HTML with specified option | |
workbook.save(dataDir + "outPresentationlayout1.html"); |
Potresti trovare utili i seguenti articoli relativi alla conversione da Excel a HTML
- Impedire l’Esportazione dei Contenuti dei Fogli Nascosti al Salvataggio in HTML
- Esportare il Foglio di Stile CSS Separatamente nell’HTML di Output
- Disabilita i Commenti Rivelati di Basso Livello durante il Salvataggio in HTML
- Esportare le Proprietà del Documento Workbook e del Foglio di Lavoro nella conversione da Excel a HTML
- Esportare l’intervallo dell’area di stampa in HTML