救命啊,急!!!(excel问题)
是这样的,目的是为了打开一个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'
怎么办???急大家帮忙哦,!!!