Fasten export from Microsoft Dynamics NAV to Microsoft Excel

<p>Automatic exports from Dynamics NAV to Microsoft Excel take long. There are various Excel-exports implemented in Dynamics NAV. For example you can export budgets to excel. There exists&nbsp; user dislike waiting for a couple of minutes until the export of huge amounts of data finishes.</p><p>If you have to export huge data amounts the export will take comparatively long.</p>
1 answer

Optimize the source for performance

The exports use a data structure called "Excel Buffer" in Dynamics NAV. All exports fill the "Excel Buffer". If all data has been transfered into the "Excel Buffer" a function will be called which creates a new worksheet in Excel and transfer all the data from the "Excel Buffer" to the worksheet. You can speed up the export if you modify the implementation of the function which transfers the data from the "Excel Buffer" to Excel. Normally empty cells (empty strings, 0, etc.) are transfered. This is not neccessary and takes only time. Additionaly all formating is done for each cell individually when it is transfered. It is faster to transfer the values first and format the worksheet afterwards. These modifications are relatively easy to implement. You can gain even more performance if you do not format the cells individually but connected areas which have the same formats. I would recommend this only as last step if the performance is still not sufficent because this is a lit bit more complex to implement.