zoukankan      html  css  js  c++  java
  • Export 到 Excel 完整的Job

    void clicked()
    {
    #Excel
    HWND HWND;
    SysExcelApplication excel;
    SysExcelWorkbooks books;
    SysExcelWorkbook book;
    SysExcelWorksheets sheets;
    SysExcelWorksheet sheet;
    SysExcelRange columns;
    SysExcelRange column;
    SysExcelCells cells;
    SysExcelCell cell;
    SysExcelStyle ExcelStyle;
    SysExcelFont ExcelFont;
    SysExcelFormatCondition FormatCondition;

    inventtable IT;
    int i = 0,j = 0;

    excel = SysExcelApplication::construct();
    books = excel.workbooks();
    book = books.add();
    Sheets = book.worksheets();
    sheet = sheets.itemFromNum(1);
    sheet.name(_Cons_Sales_No);
    super();


    while select _Consignment_Sales_Header where _Consignment_Sales_Header.Cons_sales_no == _Cons_Sales_no
    {
    excel.visible(true);
    sheet.cells().item(2,1).value("Consignment Sales #"); // item(row,column)
    sheet.cells().item(2,2).value(_Consignment_Sales_Header.Cons_sales_no);

    sheet.cells().item(3,1).value("Sales Date");
    sheet.cells().item(3,2).value(_Consignment_sales_Header.Cons_date);
    sheet.cells().item(3,1).value().handle();
    ExcelFont.bold(true);

    sheet.cells().item(4,1).value("Customer");
    sheet.cells().item(4,2).value(_Consignment_Sales_Header.Custname);

    Sheet.cells().item(5,1).value("Address");
    sheet.cells().item(5,2).value(_Consignment_Sales_Header.bill_add);


    }

    }

  • 相关阅读:
    《代码整洁之道》读书笔记六
    第九周总结
    《构建之法》读后感(五)
    学习进度条-第十二周
    3. 统计数字
    《构建之法》读后感(四)
    学习进度条-第十一周
    4. 丑数 II
    《构建之法》读后感(三)
    学习进度条-第十周
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2761595.html
Copyright © 2011-2022 走看看