Today I started to use the ExportToExcel() method of the MicroFour.StrataFrame.Tools.ExcelHelper, very easy and straight forward method. Since it will use the BO.CurrentDataTable, I was able to rename my columns and even add couple of columns I needed and the output was just perfect, of course the document in Excel needs to be formatted.
Now I have a couple of questions:
1.- The document is created with the file name I pass to the method, but the "Tab Name" or "Sheet" created in Excel will have the name of the BO.CurrentDataTable and even if I change the BO.CurrentDataTable.Name, it will always use the original BO.CurrentDataTable.Name, then when printing the document the title used is the "Tab" name. I know I can change this in the document Header, but this is a document that will be generated many times and this will be a very annoying task for the end user, so is there a way to control the name used for the "Tab Name" or "Sheet"?
2.- For the columns, the BO.CurrentDataTable has the types defined, String, Decimals, etc. in Excel all columns are type "General", is there a way to honor the column type of the BO.CurrentDataTable?
At any rate, I was generating this document in Excel using the RSS Export to Excel, but the quality of the Excel output was not good and the way they generate the columns make it impossible to add formulas, etc. in the resulting Excel document. This method is by far much more flexible and faster. Thanks!
Edhy Rijo