c++ - TdxSpreadSheet -> SaveToFile 编码问题
问题描述
我正在尝试使用TdxSpreadSheet编写一个 .xlsx 文件。但结果是一个非 utf-8 文件,当我在 Excel 中打开文件时,它会正确显示我的字符串。另一方面,使用wofstream写入一个简单的文本文件是可行的。
wofstream Outfile;
Outfile.open("out.txt");
std:wstring part;
.
.
.
dxSpreadSheet1->ActiveSheetAsTable->Cells[nRow][nCol]->SetText(part.c_str(),true); //wrong format
Outfile << part.c_str(); // works fine
.
.
.
Outfile.close();
dxSpreadSheet1->SaveToFile("test.xlsx");
任何人的想法???
问候
解决方案
推荐阅读
- r - 如何为 igraph R 中的有向图计算局部传递性和 Barrat 传递性
- python - 具有阿拉伯文本和数字变量的字段反转
- firebase - firebase 如何连接到烧瓶应用程序
- c# - C#- 检查字符串中是否只有允许的字符?
- python - 使用“导入文件”或“从文件导入变量”会破坏我的程序
- amazon-web-services - 哪个 aws 产品用于长时间运行的 ruby 任务执行?
- javascript - Discord.js 删除频道
- ios - Swift - View Controller 完成处理程序的交互式关闭
- python - 如何使用 Pandas 删除多个 excel 文件的列值并保存每个文件而不合并它们
- javascript - JavaScript AJAX:获取两个对象作为响应