Excel Template Based Exporter
Export data from any table directly to Excel with greater ease and flexibility! Only basic report skills are required to implement the Excel Template Based Exporter (ETBE).
More powerful than a dataport:
Dataports rely on hardcoding the order of field data in the Field Designer. The ETBE isn't constrained to one layout. Just create a new Excel file with the fields needed in the first row and the ETBE does the rest. Use the same report object with different template files to export table data in any field combination. All without ever writing a field name in the code!
Empower your users to customize their own excel templates. Give them the ability to:
- select the fields THEY want to see
- arrange the fields in any order
- rename what the fields are called in the export file
- pre-design excel file (print settings, format, color, etc)
- filter and so rt data just as any basic report has to offer
- include extra data from associated tables (some code required)
ETBE IS SECURE: since ETBE uses the basic report objects of Navision, users only have access to the tables you set them up to have (all while maintaining their predefined permissions).
How to use:
Just create a basic report with one dataitem. Then, add the three public function calls to the included Codeunit. The example report included demonstrates how to:
1. Initialize codeunit in OnPreDataItem
2. Export data for each record in OnAfterGetRecord
3. Save the final export in the OnPostRecord
(the easiest way is to save the included excel template directly to C:\)
Learn Excel Automation Here:
If you are new to Excel Automation, I encourage you to take a look at the code. The comment-filled codeunit provides a great overview of what is needed to make an excel export happen.
I have found this to be a very helpful tool. I originally designed it for a specific task but then later came to recognize it as a more general multi-purpose module. I am glad to take the time to package it up and be able to share it with others.
As it is still growing, please feel free to send suggestions on improvements to my email address:
chriscarlins@msn.com
Thanks
http://www.mibuso.com/dlinfo.asp?FileID=783
Discuss this download here.
Comments
Anyway. I notice that you can't overwrite a file so there for you cannot append (or add-to) an existing file. That would be my suggestion for the next update.
I will try to do it myself - but it's defiantely not my specialty.
Note I changed it to Export Sales Header Info instead of Cust Ledger Entries - Works Great.
http://www.BiloBeauty.com
http://www.autismspeaks.org
After License change "you do not have permission......."
I changed the codeunit to 50003 still with a problem.
I have access to 50000,50001,50002
Is there something stange about this codeunit?
http://www.BiloBeauty.com
http://www.autismspeaks.org
I have to download the txt version of the code, instead of fob, and modify the report ID, codeunit ID inside the report and codeunit id. I also need to make change to Automation subtype. It ran great! =D> =D>
But, I have few questions:
1. Is it true that for each table output I need to create a report for it?
2. If I read the instruction correct, I can have one report setup and user can have their own templates to show their own excel information, within their permissions?
Best Regards,
CouberPu