///Excel工具类 不支持在终端使用
class CTNXExcel
{
public:
    CTNXExcel();
    ~CTNXExcel();

    ///关闭
    void close();

    ///新建一个空的
    bool newEmpty();

    ///打开
    bool open(string sFile);

    ///设置idx为当前激活sheet
    bool setSheet(int idx);

    ///增加sheet
    bool addSheet(string sName);

    ///设置列宽度
    void setColumnWidth(int iCol,int iw);

    ///设置行高
    void setRowHeight(int iRow, int ih);

    ///列数
    int cols();

    ///行数
    int rows();

    ///将excel直接保存到CSelectHelp
    int getSelectHelp(CSelectHelp& help, bool bUserFeild = false, int iStartRow = 0, int iStartCol = 0, int iEndRow = -1, int iEndCol = -1);

    ///获取值
    string get(int row, int col);

    ///检查Sheet
    bool checkSheet();

    ///设置字符串值
    bool set(int row, int col, string v);

    ///设置日期值
    bool setDate(int row, int col, string sDate);

    ///设置整数值
    bool setNumer(int row, int col, double v);

    ///保存
    bool save(string sFile);

};
Copyright © TouchNet 2015 all right reserved,powered by Gitbook最后修订时间: 2022-06-21 09:21:04

results matching ""

    No results matching ""