Expanding text from right to left while exporting Excel file to HTML with C++
Contents
[
Hide
]
Aspose.Cells for C++ now supports expanding text from right to left while exporting Excel files to HTML. This feature has been implemented since v8.9.0.0. If your source Excel file contains any text that expands from right to left, Aspose.Cells will export it to HTML correctly.
Expanding text from right to left while exporting Excel file to HTML
The following sample code converts the sample Excel file into HTML. This screenshot shows how the sample Excel file looks in Microsoft Excel 2013.
This screenshot shows the output HTML generated with the older version.
This screenshot shows the output HTML generated with the newer version.
As you can see in the screenshots, the newer version expands the right-aligned text to the left correctly, just like Microsoft Excel.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Source directory path
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
// Load source excel file inside the workbook object
Workbook wb(srcDir + u"sample.xlsx");
// Save workbook in html format
U16String outputPath = srcDir + u"ExpandTextFromRightToLeft_out_" + CellsHelper::GetVersion() + u".html";
wb.Save(outputPath, SaveFormat::Html);
std::cout << "Workbook saved successfully in HTML format!" << std::endl;
Aspose::Cells::Cleanup();
}