Skip to main content

Notifications

Small and medium business | Business Central, N...
Answered

How to upload excel file and read data

Posted on by 952

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

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,562 on at
    RE: How to upload excel file and read data

    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. :)

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: How to upload excel file and read data

    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

  • Verified answer
    YUN ZHU Profile Picture
    YUN ZHU 73,472 Super User 2024 Season 2 on at
    RE: How to upload excel file and read data

    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

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans