load 函数加载中文路径失败问题解决方法:
CString m_csDeviceFile("E:\\新建文件夹\\1.xls");
std::string xlsFileName;
WToM(m_csDeviceFile, xlsFileName); //自己实现的WideCharToMultiBytestrncpy(buf, xlsFileName.c_str(), xlsFileName.length());
e.Load(buf);
save函数保存中文路径虽然没有错误,但是执行了没有效果,解决方法:
bool BasicExcel::Save()
{
//在此处加
setlocale(LC_ALL,"Chinese-simplified");//设置中文环境if (file_.IsOpen())
{
....
}
}