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);
}
}