• 大小: 77KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-09
  • 语言: C/C++
  • 标签: c++  读写  excel  示例  

资源简介

// Machine generated IDispatch wrapper class(es) created with ClassWizard #include "stdafx.h" #include "excel.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // _Application properties ///////////////////////////////////////////////////////////////////////////// // _Application operations LPDISPATCH _Application::GetApplication() { LPDISPATCH result; InvokeHelper(0x94, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } long _Application::GetCreator() { long result; InvokeHelper(0x95, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL); return result; } LPDISPATCH _Application::GetParent() { LPDISPATCH result; InvokeHelper(0x96, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } LPDISPATCH _Application::GetActiveCell() { LPDISPATCH result; InvokeHelper(0x131, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } LPDISPATCH _Application::GetActiveChart() { LPDISPATCH result; InvokeHelper(0xb7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } CString _Application::GetActivePrinter() { CString result; InvokeHelper(0x132, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL); return result; } void _Application::SetActivePrinter(LPCTSTR lpszNewValue) { static BYTE parms[] = VTS_BSTR; InvokeHelper(0x132, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms, lpszNewValue); } LPDISPATCH _Application::GetActiveSheet() { LPDISPATCH result; InvokeHelper(0x133, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } LPDISPATCH _Application::GetActiveWindow() { LPDISPATCH result; InvokeHelper(0x2f7, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result, NULL); return result; } LPDISPATCH _Application::GetActiveWorkbook() { LPDISPATCH result; InvokeHelper(0x134, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&resu

资源截图

代码片段和文件信息

// Machine generated IDispatch wrapper class(es) created with ClassWizard

#include “stdafx.h“
#include “excel.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif



/////////////////////////////////////////////////////////////////////////////
// _Application properties

/////////////////////////////////////////////////////////////////////////////
// _Application operations

LPDISPATCH _Application::GetApplication()
{
LPDISPATCH result;
InvokeHelper(0x94 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

long _Application::GetCreator()
{
long result;
InvokeHelper(0x95 DISPATCH_PROPERTYGET VT_I4 (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetParent()
{
LPDISPATCH result;
InvokeHelper(0x96 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetActiveCell()
{
LPDISPATCH result;
InvokeHelper(0x131 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetActiveChart()
{
LPDISPATCH result;
InvokeHelper(0xb7 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

CString _Application::GetActivePrinter()
{
CString result;
InvokeHelper(0x132 DISPATCH_PROPERTYGET VT_BSTR (void*)&result NULL);
return result;
}

void _Application::SetActivePrinter(LPCTSTR lpszNewValue)
{
static BYTE parms[] =
VTS_BSTR;
InvokeHelper(0x132 DISPATCH_PROPERTYPUT VT_EMPTY NULL parms
 lpszNewValue);
}

LPDISPATCH _Application::GetActiveSheet()
{
LPDISPATCH result;
InvokeHelper(0x133 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetActiveWindow()
{
LPDISPATCH result;
InvokeHelper(0x2f7 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetActiveWorkbook()
{
LPDISPATCH result;
InvokeHelper(0x134 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetAddIns()
{
LPDISPATCH result;
InvokeHelper(0x225 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetAssistant()
{
LPDISPATCH result;
InvokeHelper(0x59e DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

void _Application::Calculate()
{
InvokeHelper(0x117 DISPATCH_METHOD VT_EMPTY NULL NULL);
}

LPDISPATCH _Application::GetCells()
{
LPDISPATCH result;
InvokeHelper(0xee DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetCharts()
{
LPDISPATCH result;
InvokeHelper(0x79 DISPATCH_PROPERTYGET VT_DISPATCH (void*)&result NULL);
return result;
}

LPDISPATCH _Application::GetColumns()
{
LPDISPATCH result;
InvokeHelper(0xf1 DISPATCH_PROPERTYGET VT_DISPATCH (voi

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     173483  2009-06-17 13:06  excelTest\excel.cpp

     文件      46602  2009-06-17 13:06  excelTest\excel.h

     文件      35872  2009-06-17 13:36  excelTest\excelTest.aps

     文件       1216  2009-06-17 14:17  excelTest\excelTest.clw

     文件       2199  2009-06-17 13:12  excelTest\excelTest.cpp

     文件       4336  2009-06-18 11:21  excelTest\excelTest.dsp

     文件        543  2009-06-17 12:38  excelTest\excelTest.dsw

     文件       1357  2009-06-17 12:38  excelTest\excelTest.h

     文件     173056  2009-06-18 11:21  excelTest\excelTest.ncb

     文件      48640  2009-06-18 11:21  excelTest\excelTest.opt

     文件       1415  2009-06-18 11:19  excelTest\excelTest.plg

     文件       5421  2009-06-17 13:36  excelTest\excelTest.rc

     文件       9090  2009-06-18 11:19  excelTest\excelTestDlg.cpp

     文件       1452  2009-06-17 13:35  excelTest\excelTestDlg.h

     文件       3633  2009-06-17 12:38  excelTest\ReadMe.txt

     文件       1078  2009-06-17 12:38  excelTest\res\excelTest.ico

     文件        401  2009-06-17 12:38  excelTest\res\excelTest.rc2

     文件        825  2009-06-17 13:36  excelTest\resource.h

     文件        211  2009-06-17 12:38  excelTest\StdAfx.cpp

     文件       1054  2009-06-17 12:38  excelTest\StdAfx.h

     文件      23552  2009-06-18 11:21  excelTest\test.xls

     目录          0  2009-06-17 12:38  excelTest\res

     目录          0  2009-06-18 11:25  excelTest

----------- ---------  ---------- -----  ----

               535436                    23


评论

共有 条评论