Access and Update the Portions of Rich Text of Cell with Golang via C++

Access and Update the Portions of Rich Text of Cell

The following code demonstrates the usage of Cell->GetCharacters() and Cell->SetCharacters() method using the source excel file. The source excel file has a rich text in cell A1 with 3 portions, each having a different font. The code accesses these portions and updates the first portion’s font to “Arial”. The modified workbook is saved as output excel file.

C++ code to access and update rich text portions

Console output generated by the sample code

Here is the console output when using the source excel file:

Before updating the font settings....
Century
Courier New
Verdana

After updating the font settings....
Arial
Courier New
Verdana