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;
//定義要導出的表.
BeMarked _mark;
int i = 1;
//構造Excel表結構.
excel = SysExcelApplication::construct();
books = excel.workbooks();
book = books.add();
Sheets = book.worksheets();
sheet = sheets.itemFromNum(1); //控制到第幾個工作表.
sheet.name("abc");
super();
//字段名:
sheet.cells().item(1,1).value("STR"); // item(row,column)
sheet.cells().item(1,2).value("INT");
sheet.cells().item(1,3).value("Choose");
sheet.cells().item(1,4).value("company");
//導入字段值.
while select _mark
{
excel.visible(true);
sheet.cells().item(i+1,1).value(_mark.Str);
sheet.cells().item(i+1,2).value(_mark.Int);
// sheet.cells().item(3,1).value().handle(); //?
// ExcelFont.bold(true);
sheet.cells().item(i+1,3).value(_mark.choose);
sheet.cells().item(i+1,4).value(_mark.dataAreaId);
i++;
}
}