24 Jul’17

Dynamics NAVExporting record details to excel using Excel Buffer in Microsoft Dynamics NAV 2017


In this article, the selected record details by the user are exported to excel using Excel Buffer.

The requirement was such that Purchase Request is sent to the Vendors to enter the Unit cost of each Purchase Items. These details are sent to the vendors in an excel sheet. After the Unit cost is entered the excel sheet is imported again in the Dynamics NAV.


Microsoft Dynamics NAV 2017


1.Create a report and Data link between the records.

2. Below is the screenshot of the Data Item Link

3. In the globals (Ctrl+G), define the excel buffer table (no 370) to create excel sheet

4. Define the function MakeExcelDataHeader to create the header of the excel sheet and MakeExcelDataBody for the Body Lines.

5. Create a Boolean variable Print to Excel and insert it in the request page. If true then call the function CreateExcelBook.

6. On the PreDataItem Call the function MakeDataExcelHeader and OnAfterGetRecords call the function MakeDataBody

7. Using Excel Buffer table code as below in the functions

8. In the Page, create an action button to run the report.

9. In the page, select the record and click on the Export to Excel button

10. Click on OK

11. This call the report and fetches the data records in an excel sheet. This sheet is then sent to the vendor to enter the unit cost of the respective item.


Thus using excel buffer record we can export records from Microsoft Dynamics NAV to Excel sheets.


Written by

Chris D'Silva

Software Developer

2 thoughts on “Exporting record details to excel using Excel Buffer in Microsoft Dynamics NAV 2017”

    1. Hi,

      We have mentioned each step in this blog article. Please let us know if you are facing issue while implementing any particular step or if you are unable to get any step.

      Please let us know, and we will be happy to assist you.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more