C++操作Excel.pdf
《C++操作Excel.pdf》由会员分享,可在线阅读,更多相关《C++操作Excel.pdf(183页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、C+操 作 Excel所需要的Excel.h,与 Excel.cpp文件介绍:这两个文件使用C+6.0导出的,并 且 在 Visual Studio 200骁008下测试通过 Excel.CPP文 件 在 第 2 7 页*头文件Excel.h/Machine generated IDispatch wrapper class(es)created with ClassWizard/_Application wrapper classclass _Application:public COIeDispatchDriver(public:_Application()/Calls COIeDispa
2、tchDriver default constructor_Application(LPDISPATCH pDispatch):COIeDispatchDriver(pDispatch)_Application(const _Application&dispatchSrc):COIeDispatchDriver(dispatchSrc)/Attributespublic:/Operationspublic:LPDISPATCH GetApplication();long GetCreator();LPDISPATCH GetParent();LPDISPATCH GetActiveCell()
3、;LPDISPATCH GetActiveChart();CString GetActivePrinter();void SetActivePrinter(LPCTSTR IpszNewValue);LPDISPATCH GetActiveSheet();LPDISPATCH GetActiveWindow();LPDISPATCH GetActiveWorkbook();LPDISPATCH GetAddlns();LPDISPATCH GetAssistant();void Calculate();LPDISPATCH GetCells();LPDISPATCH GetCharts();L
4、PDISPATCH GetColumns();LPDISPATCH GetCommandBars();long GetDDEAppReturnCode();void DDEExecute(long Channel,LPCTSTR String);long DDEInitiate(LPCTSTR App,LPCTSTR Topic);void DDEPoke(long Channel,const VARIANT&Item,const VARIANT&Data);VARIANT DDERequest(long Channel,LPCTSTR Item);void DDETerminate(long
5、 Channel);VARIANT Evaluate(const VARIANT&Name);VARIANT _Evaluate(const VARIANT&Name);VARIANT ExecuteExcel4Macro(LPCTSTR String);LPDISPATCH lntersect(LPDISPATCH Argl,LPDISPATCH Arg2,const VARIANT&Arg3,constVARIANT&Arg4,const VARIANT&Arg57 const VARIANT&Arg6,const VARIANT&Arg7,constVARIANT&Arg8,const
6、VARIANT&Arg9z const VARIANT&ArglO,const VARIANT&Argil,const VARIANT&Argl2,const VARIANT&Argl3,constVARIANT&Argl4,const VARIANT&Argl5,const VARIANT&Argl6,const VARIANT&Argl7,constVARIANT&Argl8,const VARIANT&Argl9z const VARIANT&Arg20,const VARIANT&Arg21,const VARIANT&Arg22,const VARIANT&Arg23,constVA
7、RIANT&Arg24,const VARIANT&Arg25,const VARIANT&Arg26,const VARIANT&Arg27,constVARIANT&Arg28,const VARIANT&Arg29,const VARIANT&Arg30);LPDISPATCH GetNames();LPDISPATCH GetRange(const VARIANT&Celli,const VARIANT&Cell2);LPDISPATCH GetRows();VARIANT Run(const VARIANT&Macro,const VARIANT&Argl,const VARIANT
8、&Arg2,constVARIANT&Arg3,const VARIANT&Arg4,const VARIANT&Arg5z const VARIANT&Arg6,constVARIANT&Arg7,const VARIANT&Arg8,const VARIANT&Arg9,const VARIANT&ArglO,const VARIANT&Argil,const VARIANT&Argl2,constVARIANT&Argl3,const VARIANT&Argl4,const VARIANT&Argl5,const VARIANT&Argl6,constVARIANT&Argl7,cons
9、t VARIANT&Argl8,const VARIANTS Argl9,const VARIANT&Arg20,const VARIANT&Arg21,const VARIANT&Arg22,constVARIANT&Arg23,const VARIANT&Arg24,const VARIANT&Arg25z const VARIANT&Arg26,constVARIANT&Arg27,const VARIANT&Arg28,const VARIANT&Arg29,const VARIANT&Arg30);VARIANT _Run2(const VARIANT&Macro,const VAR
10、IANT&Argl,const VARIANT&Arg2,constVARIANT&Arg3,const VARIANT&Arg4z const VARIANT&Arg5,const VARIANT&Arg6,constVARIANT&Arg7,const VARIANT&Arg8,const VARIANT&Arg9,const VARIANT&ArglO,const VARIANT&Argil,const VARIANT&Argl2,constVARIANT&Argl3,const VARIANT&Argl4,const VARIANT&Argl5,const VARIANT&Argl6,
11、constVARIANT&Argl7z const VARIANT&Argl8,const VARIANT&Argl9,const VARIANT&Arg20,const VARIANT&Arg21,const VARIANT&Arg22,constVARIANT&Arg23,const VARIANT&Arg24,const VARIANT&Arg25,const VARIANT&Arg26,constVARIANT&Arg27,const VARIANT&Arg28,const VARIANT&Arg29,const VARIANT&Arg30);LPDISPATCH GetSelecti
12、on();void SendKeys(const VARIANT&Keys,const VARIANT&Wait);LPDISPATCH GetSheets();LPDISPATCH GetThisWorkbook();LPDISPATCH Union(LPDISPATCH Argl,LPDISPATCH Arg2,const VARIANT&Arg3,constVARIANT&Arg4,const VARIANT&Arg5,const VARIANT&Arg6,const VARIANT&Arg7,constVARIANT&Arg8,const VARIANT&Arg9,const VARI
13、ANT&ArglO,const VARIANT&Argil,const VARIANT&Argl2,const VARIANT&Argl3,const VARIANT&Argl4z constVARIANT&Argl5,const VARIANT&Argl6,const VARIANT&Argl7,const VARIANT&Argl8z constVARIANT&Argl9,const VARIANT&Arg20,const VARIANT&Arg21,const VARIANT&Arg22,const VARIANT&Arg23,const VARIANT&Arg24,constVARIA
14、NT&Arg25,const VARIANT&Arg26,const VARIANT&Arg27,const VARIANT&Arg28,constVARIANT&Arg29,const VARIANT&Arg30);LPDISPATCH GetWindows();LPDISPATCH GetWorkbooks();LPDISPATCH GetWorksheetFunction();LPDISPATCH GetWorksheets();LPDISPATCH GetExcel4lntlMacroSheets();LPDISPATCH GetExcel4MacroSheets();void Act
15、ivateMicrosoftApp(long Index);void AddChartAutoFormat(const VARIANT&Chart,LPCTSTR Name,const VARIANT&Description);void AddCustomList(const VARIANT&ListArray,const VARIANT&ByRow);BOOL GetAlertBeforeOverwritingO;void SetAlertBeforeOverwriting(BOOL bNewValue);CString GetAltStartupPath();void SetAltStar
16、tupPath(LPCTSTR IpszNewValue);BOOL GetAskToUpdateLinks();void SetAskTollpdateLinks(BOOL bNewValue);BOOL GetEnableAnimations();void SetEnableAnimations(BOOL bNewValue);LPDISPATCH GetAutoCorrect();long GetBuild();BOOL GetCalculateBeforeSave();void SetCalculateBeforeSave(BOOL bNewValue);long GetCalcula
17、tion();void SetCalculation(long nNewValue);VARIANT GetCaller(const VARIANT&Index);BOOL GetCanPlaySounds();BOOL GetCanRecordSounds();CString GetCaption();void SetCaption(LPCTSTR IpszNewValue);BOOL GetCellDragAndDrop();void SetCellDragAndDrop(BOOL bNewValue);double CentimetersToPoints(double Centimete
18、rs);BOOL CheckSpelling(LPC7rSTR Word,const VARIANT&CustomDictionary,const VARIANT&IgnoreUppercase);VARIANT GetClipboardFormats(const VARIANT&Index);BOOL GetDisplayClipboardWindow();void SetDisplayClipboardWindow(BOOL bNewValue);long GetCommandUnderlinesO;void SetCommandUnderlines(long nNewValue);BOO
19、L GetConstrainNumeric();void SetConstrainNumeric(BOOL bNewValue);VARIANT ConvertFormula(const VARIANT&Formula,long From Ref e re n ce Sty I e,constVARIANT&ToReferenceStyle,const VARIANT&ToAbsolute,const VARIANT&RelativeTo);BOOL GetCopyObjectsWithCells();void SetCopyObjectsWithCells(BOOL bNewValue);l
20、ong GetCursor();void SetCursor(long nNewValue);long GetCustomListCount();long GetCutCopyMode();void SetCutCopyMode(long nNewValue);long GetDataEntryMode();void SetDataEntryMode(long nNewValue);CString Get_Default();CString GetDefaultFilePath();void SetDefaultFilePath(LPCTSTR IpszNewValue);void Delet
21、eChartAutoFormat(LPCTSTR Name);void DeleteCustomList(long ListNum);LPDISPATCH GetDialogs();BOOL GetDisplayAlerts();void SetDisplayAlerts(BOOL bNewValue);BOOL GetDisplayFormulaBarO;void SetDisplayFormulaBar(BOOL bNewValue);BOOL GetDisplayFullScreen();void SetDisplayFullScreen(BOOL bNewValue);BOOL Get
22、DisplayNotelndicator();void SetDisplayNotelndicator(BOOL bNewValue);long GetDisplayCommentlndicatorO;void SetDisplayCommentlndicator(long nNewValue);BOOL GetDisplayExcel4Menus();void SetDisplayExcel4Menus(BOOL bNewValue);BOOL GetDisplayRecentFiles();void SetDisplayRecentFiles(BOOL bNewValue);BOOL Ge
23、tDisplayScrollBars();void SetDisplayScrollBars(BOOL bNewValue);BOOL GetDisplayStatusBar();void SetDisplayStatusBar(BOOL bNewValue);void DoubleClick();BOOL GetEditDirectlylnCell();void SetEditDirectlylnCell(BOOL bNewValue);BOOL GetEnableAutoComplete();void SetEnableAutoComplete(BOOL bNewValue);long G
24、etEnableCancelKey();void SetEnableCancelKey(long nNewValue);BOOL GetEnableSound();void SetEnableSound(BOOL bNewValue);VARIANT GetFileConverters(const VARIANT&Indexl,const VARIANT&Index2);LPDISPATCH GetFileSearch();LPDISPATCH GetFileFind();BOOL GetFixedDecimal();void SetFixedDecimal(BOOL bNewValue);l
25、ong GetFixedDecimalPlaces();void SetFixedDecimalPlaces(long nNewValue);VARIANT GetCustomListContents(long ListNum);long GetCustomListNum(const VARIANT&ListArray);VARIANT GetOpenFilename(const VARIANT&FileFilter,const VARIANT&Filterindex,constVARIANT&Title,const VARIANT&ButtonText,const VARIANT&Multi
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- C+ 操作 Excel
限制150内