資源簡介
VS2010對Excel2010進行操作,包括操作Excel進行曲線繪圖
代碼片段和文件信息
//?Excel.cpp?:?Defines?the?class?behaviors?for?the?application.
//
#include?“stdafx.h“
#include?“Excel.h“
#include?“ExcelDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
//?CExcelApp
BEGIN_MESSAGE_MAP(CExcelApp?CWinApp)
ON_COMMAND(ID_HELP?&CWinApp::onhelp)
END_MESSAGE_MAP()
//?CExcelApp?construction
CExcelApp::CExcelApp()
{
//?support?Restart?Manager
m_dwRestartManagerSupportFlags?=?AFX_RESTART_MANAGER_SUPPORT_RESTART;
//?TODO:?add?construction?code?here
//?Place?all?significant?initialization?in?InitInstance
}
//?The?one?and?only?CExcelApp?object
CExcelApp?theApp;
//?CExcelApp?initialization
BOOL?CExcelApp::InitInstance()
{
//?InitCommonControlsEx()?is?required?on?Windows?XP?if?an?application
//?manifest?specifies?use?of?ComCtl32.dll?version?6?or?later?to?enable
//?visual?styles.??Otherwise?any?window?creation?will?fail.
INITCOMMONCONTROLSEX?InitCtrls;
InitCtrls.dwSize?=?sizeof(InitCtrls);
//?Set?this?to?include?all?the?common?control?classes?you?want?to?use
//?in?your?application.
InitCtrls.dwICC?=?ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
if?(CoInitialize(NULL)?!=?0)
{
AfxMessageBox(_T(“初始化com失敗“));
exit(1);
}
//?Create?the?shell?manager?in?case?the?dialog?contains
//?any?shell?tree?view?or?shell?list?view?controls.
CShellManager?*pShellManager?=?new?CShellManager;
//?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
//?Change?the?registry?key?under?which?our?settings?are?stored
//?TODO:?You?should?modify?this?string?to?be?something?appropriate
//?such?as?the?name?of?your?company?or?organization
SetRegistryKey(_T(“Local?AppWizard-Generated?Applications“));
CExcelDlg?dlg;
m_pMainWnd?=?&dlg;
INT_PTR?nResponse?=?dlg.DoModal();
if?(nResponse?==?IDOK)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?OK
}
else?if?(nResponse?==?IDCANCEL)
{
//?TODO:?Place?code?here?to?handle?when?the?dialog?is
//??dismissed?with?Cancel
}
//?Delete?the?shell?manager?created?above.
if?(pShellManager?!=?NULL)
{
delete?pShellManager;
}
//?Since?the?dialog?has?been?closed?return?FALSE?so?that?we?exit?the
//??application?rather?than?start?the?application‘s?message?pump.
return?FALSE;
}
int?CExcelApp::ExitInstance()
{
//?TODO:?Add?your?specialized?code?here?and/or?call?the?base?class
CoUninitialize();???//釋放com資源
return?CWinApp::ExitInstance();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????179712??2017-04-28?10:38??Excel\Debug\Excel.exe
?????文件????1126964??2017-04-28?10:38??Excel\Debug\Excel.ilk
?????文件????5172224??2017-04-28?10:38??Excel\Debug\Excel.pdb
?????文件??????80051??2017-04-27?11:06??Excel\Excel\CApplication.h
?????文件??????36081??2017-04-27?16:52??Excel\Excel\CChart.h
?????文件???????8079??2017-04-27?16:55??Excel\Excel\CChartob
?????文件???????8653??2017-04-27?16:55??Excel\Excel\CChartob
?????文件??????45732??2017-04-27?11:07??Excel\Excel\CRange.h
?????文件??????45673??2017-04-27?11:06??Excel\Excel\CWorkbook.h
?????文件???????7507??2017-04-27?11:06??Excel\Excel\CWorkbooks.h
?????文件??????29477??2017-04-27?11:06??Excel\Excel\CWorksheet.h
?????文件???????5067??2017-04-27?11:06??Excel\Excel\CWorksheets.h
?????文件???????2070??2017-04-28?10:38??Excel\Excel\Debug\cl.command.1.tlog
?????文件??????71052??2017-04-28?10:38??Excel\Excel\Debug\CL.read.1.tlog
?????文件???????1094??2017-04-28?10:38??Excel\Excel\Debug\CL.write.1.tlog
?????文件????????915??2017-04-27?16:55??Excel\Excel\Debug\Excel.exe.em
?????文件????????980??2017-04-27?16:55??Excel\Excel\Debug\Excel.exe.em
?????文件????????640??2017-04-28?10:38??Excel\Excel\Debug\Excel.exe.intermediate.manifest
?????文件?????????55??2017-04-28?10:38??Excel\Excel\Debug\Excel.lastbuildstate
?????文件???????2348??2017-04-28?10:38??Excel\Excel\Debug\Excel.log
?????文件??????30559??2017-04-27?16:55??Excel\Excel\Debug\Excel.obj
?????文件???35258368??2017-04-27?16:55??Excel\Excel\Debug\Excel.pch
?????文件??????69604??2017-04-28?10:38??Excel\Excel\Debug\Excel.res
?????文件????????713??2017-04-27?17:13??Excel\Excel\Debug\Excel.vcxprojResolveAssemblyReference.cache
?????文件??????????0??2017-04-27?16:55??Excel\Excel\Debug\Excel.write.1.tlog
?????文件?????100118??2017-04-28?10:38??Excel\Excel\Debug\ExcelDlg.obj
?????文件????????200??2017-04-27?16:55??Excel\Excel\Debug\Excel_manifest.rc
?????文件??????????2??2017-04-28?10:38??Excel\Excel\Debug\li
?????文件??????????2??2017-04-28?10:38??Excel\Excel\Debug\li
?????文件??????????2??2017-04-28?10:38??Excel\Excel\Debug\li
............此處省略44個文件信息
- 上一篇:很全的智慧城市解決方案含可研
- 下一篇:銀行信息系統管理概論
評論
共有 條評論