Announcements
Hi Experts,
There is any ready x++ code which can export all vendor data to excel sheet .
Best Regards,
Shabir Ahmad
Hi Shabir,
You can use the SysExcel* class to export, try some published blog codes.
Please refer this: imdaxershiv.blogspot.com/.../x-code-to-export-data-to-excel-sheet-in.html
Hi Shabir,
Try this job it exports from VendTable.
static void ExporttoExcel(Args _args) { SysExcelApplication sysExcelApplication; SysExcelWorkbooks excelWorkbookCollection; SysExcelWorkbook excelWorkbook; SysExcelWorksheets excelWorksheetCollection; SysExcelWorksheet excelWorksheet; int i =1; str filename; vendTable vendTable; ; // give the file name and save it to c drive filename = "c:\\test.xls"; // initlize the SysExcelApplication instance sysExcelApplication = SysExcelApplication::construct(); //create excel workbook and excel worksheet excelWorkbookCollection = sysExcelApplication.workbooks(); excelWorkbook = excelWorkbookCollection.add(); excelWorksheetCollection = excelWorkbook.worksheets(); excelWorksheet = excelWorksheetCollection.itemFromNum(1); // excel column captions excelWorksheet.cells().item(i,1).value("AccountNumber"); excelWorksheet.cells().item(i,2).value("AccountName"); excelWorksheet.cells().item(i,3).value("VendorGroup"); i ; // fill the excel with vendtable Fields while select VendTable { excelWorksheet.cells().item(i,1).value(vendTable.AccountNum); excelWorksheet.cells().item(i,2).value(vendTable.name()); excelWorksheet.cells().item(i,3).value(vendTable.VendGroup); i ; } //check the fileName is already exist if(WinAPI::fileExists(filename)) WinAPI::deleteFile(filename); // save excel file excelWorkbook.saveAs(filename); // open excel file sysExcelApplication.visible(true); // close excel file // sysExcelApplication.quit(); }
Hope this helps,
Regards,
M
Hi Mohammad Al-Saheb,
I wanted to use x++ job to export the vendor master data. I know DIXF is also good.
Best Regards,
Shabir Ahmad
Hi Shabir,
Do you really need to use x++ code to export ?
You can use Data Import/Export Framework (DIXF) where you can export vendor data in a tabular format.
Regards,
M
André Arnaud de Cal...
294,110
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator