How To export date to Excel!-good

#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; ; excel = SysExcelApplication::construct(); books = excel.workbooks(); book = books.add(); Sheets = book.worksheets(); sheet = sheets.itemFromNum(1); i = 1; sheet.name(LJ_BarcodeTable.BatchID); excel.visible(true); super(); //set title sheet.cells().item(1,1).value(“ITEMID”); sheet.cells().item(1,2).value(“BarCode”); sheet.cells().item(1,3).value(“Customer”); Sheet.cells().item(1,4).value(“Salesprice”); Sheet.cells().item(1,5).value(“MadeIn”); //coloms detail sheet.cells().item(i,1).value(ITEMID); sheet.cells().item(i,2).value(ItemBarcode); sheet.cells().item(i,3).value(CustumerID); sheet.cells().item(i,4).value(SalesPrice); sheet.cells().item(i,5).value(MadeIn); for your reference.

quote:


Originally posted by hua excel = SysExcelApplication::construct(); books = excel.workbooks(); [SNIP] for your reference.


Do You know how to format the cells in Excel? E.g.: Columns.Select(“E:E”) Selection.NumberFormat = “#,##0.00” Thanks

HI,Wassini As far as I am concerned,we can not use the excel property directly,In your case, You should format your number to your desired format(eg,"#,##0.00") in Axapta, and then export it to excel as a string datatype. I think this way can meet your requirement. Best regard. Andy.