tfussell / xlnt

:bar_chart: Cross-platform user-friendly xlsx library for C++11+
Other
1.47k stars 409 forks source link

Wide character #612

Closed vg8open closed 2 years ago

vg8open commented 2 years ago

I am using xlnt in a Visual Studio project which uses unicode character set. I am trying to read the text in a cell with something like this: sheet.cell(cell_reference(Col, Row)).to_string(), and it looks like to_string() is defined as std::string to_string() const;.

In Visual Studio, std::string is defined as below, which is not wide character set. image

Can you tell me how to get xlnt to output wide string character using wchar_t?

Thanks

vg8open commented 2 years ago

Use MultiByteToWideChar() to convert to the correct format