将Excel转换为HTML 使用PresentationPreference选项以获得更好的布局

Contents
[ ]
// 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");

您可能会发现以下关于将Excel转换为HTML的文章有用