Notifications
Announcements
No record found.
Hi Experts,
There is any ready x++ code which can export all vendor data to excel sheet .
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
Hi Mohammad Al-Saheb,
I wanted to use x++ job to export the vendor master data. I know DIXF is also good.
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,
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
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 592 Most Valuable Professional
André Arnaud de Cal... 478 Super User 2025 Season 2
BillurSamdancioglu 305 Most Valuable Professional