终于解决了excel操作及cspreadsheet.h问题
2016-05-07 15:46
309 查看
困扰多日的excel操作问题终于解决:利用cspreadsheet.h!在vs2005下,不能直接应用cspreadsheet.h,所以必须解决些问题先。
首先,
出现暴多错误。解决UNICODE问题,全部添加L。 [1]
+++++++++++++++++++
其次,
出现问题:
error C2664: 'SQLGetInstalledDriversW ' : cannot convert parameter 1 from 'char [2001] ' to 'LPWSTR '
SQLGetInstalledDrivers(szBuf,cbBufMax,& cbBufOut)
SQLGetInstalledDriversW的参数1需要宽字符,
修正它!
把
char szBuf[2001];
char *pszBuf = szBuf;
改为
wchar_t szBuf[2001];
wchar_t *pszBuf = szBuf; [2]
+++++++++++++++++++++++
再次,
出现问题:
error C2665: 'strstr' : none of the 2 overloads could convert all the argument types
把strstr改写成_tcsstr 。 [3]
+++++++++++++++++++++++
同时会出现问题:
error C2665: 'strchr' : none of the 2 overloads could convert all the argument types
把strchr改写成wcschr。 [4]
------------------------------------
参考资料:
[1]cspreadsheet,编译不通过
http://topic.csdn.net/u/20080506/15/c7c1a0b6-7fb8-4e14-b1f0-102a853b7d6e.html?338699236
[2]char转换成LPWSTR的小问题??
http://topic.csdn.net/u/20070422/17/80f22eb8-c0f2-4313-b191-e86b60ef2f5b.html
[3]今天很高兴,又解决了一个问题,感谢牛牛们
http://blog.csdn.net/ehfaafzv/archive/2006/09/20/1253120.aspx
[4]Unicode and find exceldriver
http://www.codeguru.com/forum/showthread.php?threadid=433263
首先,
出现暴多错误。解决UNICODE问题,全部添加L。 [1]
+++++++++++++++++++
其次,
出现问题:
error C2664: 'SQLGetInstalledDriversW ' : cannot convert parameter 1 from 'char [2001] ' to 'LPWSTR '
SQLGetInstalledDrivers(szBuf,cbBufMax,& cbBufOut)
SQLGetInstalledDriversW的参数1需要宽字符,
修正它!
把
char szBuf[2001];
char *pszBuf = szBuf;
改为
wchar_t szBuf[2001];
wchar_t *pszBuf = szBuf; [2]
+++++++++++++++++++++++
再次,
出现问题:
error C2665: 'strstr' : none of the 2 overloads could convert all the argument types
把strstr改写成_tcsstr 。 [3]
+++++++++++++++++++++++
同时会出现问题:
error C2665: 'strchr' : none of the 2 overloads could convert all the argument types
把strchr改写成wcschr。 [4]
------------------------------------
参考资料:
[1]cspreadsheet,编译不通过
http://topic.csdn.net/u/20080506/15/c7c1a0b6-7fb8-4e14-b1f0-102a853b7d6e.html?338699236
[2]char转换成LPWSTR的小问题??
http://topic.csdn.net/u/20070422/17/80f22eb8-c0f2-4313-b191-e86b60ef2f5b.html
[3]今天很高兴,又解决了一个问题,感谢牛牛们
http://blog.csdn.net/ehfaafzv/archive/2006/09/20/1253120.aspx
[4]Unicode and find exceldriver
http://www.codeguru.com/forum/showthread.php?threadid=433263
相关文章推荐
- iOS 网络请求 笔记
- Spring hibernatecallback学习
- KJHttp框架使用讲解
- 高校采购招标信息管理系统
- Amazon Employee Access 数据分析报告(python)
- BM算法详解
- 集群化部署定时任务
- listview的九大重要属性
- 如何检测AudioRecord是否被第三方管理应用给禁用了,附上demo
- 11周 5 项目 - 摩托车继承自行车和机动车
- 基于jquery实现图片放大功能
- Android getScrollX()详解
- 集群环境下如何防止定时任务重复执行?
- 线程与进程
- OpenCV(学习笔记1)-简述
- U盘转换NTFS格式
- es5 reduce()
- iOS收到Push后播放声音和震动
- DAY1 linux 50条命令
- Tomcat在Linux下的安装与配置