ExcelファイルをHTMLにエクスポートする際にテキストを右から左に展開する
Contents
[
Hide
]
Aspose.Cells は、Excel ファイルを HTML にエクスポートする際に、右から左へのテキストの展開をサポートするようになりました。この機能は v8.9.0.0 以降に実装されています。ソース Excel ファイルに右から左に展開するテキストが含まれている場合、Aspose.Cells はそれを HTML に正しくエクスポートします。
ExcelファイルをHTMLにエクスポートする際にテキストを右から左に展開する
次のサンプル コードは、サンプルエクセルファイルこのスクリーンショットは、サンプルの Excel が Microsoft Excel 2013 でどのように表示されるかを示しています。
このスクリーンショットは、古いバージョンで生成された出力 HTML.
このスクリーンショットは、新しいバージョンで生成された出力 HTML.
スクリーンショットでわかるように、新しいバージョンでは、右揃えのテキストが Microsoft 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-.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); |