Notifications
Announcements
No record found.
Hi,
I have to read the Data from Excel sheet. Here below is my Excel sheet.The First item id i cant able to read the Second row i able to read. Any Suggestions please. I have tried formatting Cells but it hasn't help for me.
Regards,
Ram.
Hi Ram, normally the first and send row in excel stores header and template information, try to start your first item on Row 3.
For build in import by excel function, you need to copy paste your data to the excel template exported and then import by system, if this import by excel function is customized, please check your code.
Hi Ziyao,
My code can't able to read the only integer values(Eg:1000), but it can able to read the Values which is Suffixed with String (Eg: "D001"). that's what the issue i am facing now. can you able to understand my issue.
Is this a customized import function or it's a standard build in import function? If it is a build in standard function, could you please indicate where it exactly placed?
Can you share with us any details about how you are reading data from Excel sheet? Seems you forgot to mention it.
Are you using one of the out of the box functionalities (defintion groups, DIXF) or did you write some own code?
Here is my code to read the Item id from Excel sheet.
static void ReadingExcel(Args _args) { SalesTable salesTable; SalesLine salesLine; NumberSeq numberSeq; SalesFormLetter salesFormLetter; SalesFormLetter_PickingList salesFormLetterpick; SalesId salesId; InventDim inventdim; Dialog dialog; DialogField file; SysExcelApplication application,application1; SysExcelWorkbooks workbooks,workbooks1; SysExcelWorkbook workbook,workbook1; SysExcelWorksheets worksheets,worksheets1; SysExcelWorksheet worksheet,worksheet1; SysExcelCells cells,cells1; SysExcelCell cell1; SysExcelFont font; COMVariantType type,type1; FileName filename,filename1; str Custaccount,itemno,salesunit; real quantity; real salesprice; int row=1; int row1 = 2; dialog = new Dialog("Please select the file to load"); dialog.addText("Select file:"); file = dialog.addField(ExtendedTypeStr("FilenameOpen")); dialog.run(); if (dialog.closedOK()) { info(file.value()); application = SysExcelApplication::construct(); workbooks = application.workbooks(); //specify the file path that you want to read filename =file.value(); //ExcelSheet File Name try { workbooks.open(filename); } catch (Exception::Error) { throw error('File cannot be opened'); } workbook = workbooks.item(1); worksheets = workbook.worksheets(); worksheet = worksheets.itemFromNum(1); //Here 1 is the worksheet Number cells = worksheet.cells(); do { row ; itemno = any2str(cells.item(row,2).value().bStr()); info(itemno); type = cells.item(row 1, 1).value().variantType(); } while (type != COMVariantType::VT_EMPTY); workbooks.close(); application.quit(); info("Done!"); } }
And do you get some error when you run it? What error? What line of code causes the error?
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 611 Most Valuable Professional
André Arnaud de Cal... 529 Super User 2025 Season 2
Sohaib Cheema 285 User Group Leader