xj qian
2025-04-07 e4d89662adfded05672a318481a7a0c91d963fae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#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);
    }
};