StrataFrame Forum

Using ExcelHelper Tool to Export Business Object to Excel Document

http://forum.strataframe.net/Topic25683.aspx

By Trent L. Taylor - 1/31/2010

Overview
Another common topic that comes up on the forum is exporting a BO to an Excel spreadhsheet.  And this is one of those tools that you don't need it until you need it.  But once you do, it is extremely handy!  The ExcelHelper uses the Microsoft Jet OLEDB engine to interface with Excel to query and produce the document.  So if you are running on a 64-bit machine, be sure to build the assembly in x86 otherwise it will not work.

Solution
This sample is pretty straight forward.  The business object will first be populated with 100 records and then those records are then exported to an Excel document.  You can see that the code required is minimal and very easy to implement!