This is more of a how-to than an actual question. (I searched and couldn't find a solution, so I came up with this)
I needed to create an excel file export that would allow users to :
- filter the data using a form, from the original table
- Export the results to an excel file, from the original table.
- Allow non standard column names with spaces and some special characters.
- Format the exported data in some columns, while keeping the original table values (for filtering).
I searched and couldn't find a solution, so I came up with this:
Using sample table "Salary"
First create a special model for pulling the excel data. Example "export.cfc"
models\export.cfc
Then just pull the specific columns you need for the excel export. ([] are required)