将 Excel 文件导出到 HTML 时从右向左展开文本

将 Excel 文件导出到 HTML 时从右向左展开文本

下面的示例代码将示例 excel 文件进入 HTML。此屏幕截图显示示例 excel 在 Microsoft Excel 2013 中的外观。

待办事项:图片_替代_文本

此屏幕截图显示使用旧版本生成的输出 HTML.

待办事项:图片_替代_文本

此屏幕截图显示使用较新版本生成的输出 HTML.

待办事项:图片_替代_文本

正如您在屏幕截图中看到的那样,新版本将右对齐文本正确地扩展到左侧,就像 Microsoft Excel 一样。

// 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);
// Load source excel file inside the workbook object
Workbook wb = new Workbook(dataDir + "sample.xlsx");
// Save workbook in html format
wb.Save(dataDir + "ExpandTextFromRightToLeft_out_" + CellsHelper.GetVersion() + ".html", SaveFormat.Html);