#pragma once #include "wobject/xcontrol.hpp" #include "kobject/kexcel.hpp" using kexcel = CExcelApplication; class xexcel : public xcontrol { public: xexcel() :xcontrol(kexcel::CreateInstance()) {} ~xexcel(){ GetKExcel()->Release(GetKExcel()); } public: kexcel* GetKExcel() { return (kexcel*)this->GetNativePtr(); } public: void put_Visible(BOOL newValue) //alias "?put_Visible@CExcelApplication@@QAEXH@Z"; { return GetKExcel()->put_Visible(newValue); } bool get_Visible() //alias "?get_Visible@CExcelApplication@@QAEHXZ"; { return GetKExcel()->get_Visible(); } void OpenDocument(xstring FileName) //alias "?OpenDocument@CExcelApplication@@QAEXQA_W@Z"; { return GetKExcel()->OpenDocument((const LPTSTR)FileName.c_str()); } void TransShape() //alias "?TransShape@CExcelApplication@@QAEXXZ"; { return GetKExcel()->TransShape(); } void SaveToFile(xstring FileName)// alias "?SaveToFile@CExcelApplication@@QAEXQA_W@Z"; { GetKExcel()->SaveToFile((const LPTSTR)FileName.c_str()); } void Quit() //alias "?Quit@CExcelApplication@@QAEXXZ"; { GetKExcel()->Quit(); } int GetValidRow() { return GetKExcel()->GetValidRow(); } int GetValidColumn() { return GetKExcel()->GetValidColumn(); } BSTR GetCellString(int row, int col) { return GetKExcel()->GetCellString(row, col); } int SetICellString(int row, int col, const wchar_t* val) { return GetKExcel()->SetICellString(row, col, val); } };