Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
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 into 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();
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.