对了,我在这之前已经初始化过来,初始化的部分代码:
BOOL CHandle_excelApp::InitInstance()
{
AfxEnableControlContainer(); // Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
if (CoInitialize( NULL )!=NULL)
{
AfxMessageBox(_T("初始化Com失败!"));
}
这里并没有报错.....
可是创建的时候却报错了。
BOOL CHandle_excelApp::InitInstance()
{
AfxEnableControlContainer(); // Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
if (CoInitialize( NULL )!=NULL)
{
AfxMessageBox(_T("初始化Com失败!"));
}
这里并没有报错.....
可是创建的时候却报错了。
主线程中,我压根都没考虑多线程....我刚才在网上下载了个实例程序,用到EXCEL操作了,发现问题依旧
我在怀疑是不是电脑的问题,我刚重装的系统,装的是OFFCIE 2010官方原版(office profe plus),现在正在尝试装2003测试。除了这方面的问题还有啥可能哦
我在注册表里看了的,office安装是正常的。
主线程中,我压根都没考虑多线程....我刚才在网上下载了个实例程序,用到EXCEL操作了,发现问题依旧
我在怀疑是不是电脑的问题,我刚重装的系统,装的是OFFCIE 2010官方原版(office profe plus),现在正在尝试装2003测试。除了这方面的问题还有啥可能哦
我在注册表里看了的,office安装是正常的。
我现在在想,到底要不要这个功能,如果这么鸡肋,还不如就不要算了...
如果有人出现类似问题可以考虑进行尝试。PS:在release模式下你的程序可能会出现一些莫名其妙的问题,而且无法设置断点进行调试,不过这些问题一般都是程序代码不严谨导致的,可以试着采用messagebox查找原因。