• 全部
  • Windows SDK/API
  • 基础类
  • ActiveX
  • 数据库及相关技术
  • 网络及通讯开发
  • VCL组件使用和开发
  • 问答

救命啊,急!!!(excel问题)

supercctv 2003-06-14 07:48:44
是这样的,目的是为了打开一个excel文件,读入里面的数据,写入数据库.
查了以前的帖子,
在Form1.h头文件中定义几个变量:
private:
Variant Ex,Wb,Sheet,ERange,EBorders;
并在文件头中包含如下语句:
#include "Excel_2K_SRVR.h"
#include <OleServer.hpp>
在Form1.cpp的文件头中加入
#pragma link "Excel_2K_SRVR"
....
按照上面的做了,结果编译的时候显示:
[C++ Error] ComCtrls.hpp(2638): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows'
[C++ Error] ComCtrls.hpp(2839): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows'
[C++ Error] ComCtrls.hpp(3430): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3431): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3435): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3477): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3577): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3640): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3641): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3652): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3657): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3699): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(3706): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] ComCtrls.hpp(4140): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows'
[C++ Error] ComCtrls.hpp(4259): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows'
[C++ Error] ComCtrls.hpp(4429): E2015 Ambiguity between 'Windows' and 'Excel_2k::Windows'
[C++ Error] DBCtrls.hpp(1075): E2015 Ambiguity between 'Buttons' and 'Excel_2k::Buttons'
[C++ Error] DBCtrls.hpp(1077): E2015 Ambiguity between 'Buttons' and 'Excel_2k::Buttons'
[C++ Error] DBCtrls.hpp(1096): E2015 Ambiguity between 'Buttons' and 'Excel_2k::Buttons'
[C++ Error] DBGrids.hpp(62): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] DBGrids.hpp(102): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'
[C++ Error] DBGrids.hpp(148): E2015 Ambiguity between 'Menus' and 'Excel_2k::Menus'

怎么办???急大家帮忙哦,!!!
...全文
53 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
xujie839997 2003-06-23
mark
回复
TR@SOE 2003-06-16
我推荐使用Office控件组进行操作。

我的头文件中是这样的:

ExportFunc.cpp:

#pragma hdrstop

#include "ExportFunc.h"
#include "DM.h"
#include "Excel_2K_SRVR.h"
#include <OleServer.hpp>
#include <fstream>
using std::ofstream;

有时你需要修改一些头文件的包含次序。
回复
yangfan369 2003-06-16
使用OLE可能会好点
回复
fyje 2003-06-16
应该是Excel_2k这个文件不在搜索目录下造成的
在环境里面的library path中加入该文件的路径就可以了
回复
我不懂电脑 2003-06-14
我一般用ExcelApplication这套组件操作。
回复
相关推荐
发帖
C++ Builder
创建于2007-08-02

1.3w+

社区成员

C++ Builder相关内容讨论区
申请成为版主
帖子事件
创建了帖子
2003-06-14 07:48
社区公告
暂无公告