Hi All
Does anyone know how to upload excel from PC and read data from excel? I found something, but all of them are enter file path, file name, and sheet name. However I want to open a dialog, and select file from PC. Then I can ready data from excel.
I found some code like this can help to upload excel file, but I have no idea how to ready data from excel row by row.
FileMgt.BLOBImportWithFilter(TempBlob,ImportFromExcelTxt,'',FileExtensionFilterTok,ExcelFileExtensionTok)
Best Regards,
JustZM
You will find lot of materials on this over internet, I will request you to give some more time and conquer this of your own, this is too simple and you will find complete code exactly the same you want over internet. :)
What you will note with Yun’s advice is it is worksheet by worksheet. That is how the file is handled. If you need to ignore that kind of logic you may consider a different file type like csv or xml. Alternatively you can get data from excel into NAV with a configuration package which reads all the data in the file. Note that uses an excel table so it can pass the data in a xml structure - which can ignore the worksheet logic
Hi, here are two simple examples from BC that I hope will be helpful.
How to use Excel Buffer to Import data
https://yzhums.com/4223/
How to use Excel Buffer to Export data
https://yzhums.com/4180/
By the way, if you search for 'ExcelBuffer', you should soon find the answer.
https://www.cloudfronts.com/importing-excel-file-microsoft-dynamics-nav-using-excel-buffer/
ZHU
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156