Hello there, I just bought a book to learn ColdFusion, so I have a project but I wonder if the following is possible: To create a page where the user can select: 1 - Date Range 2 - Report Name 3 - select to export to Excel, and here is the trick, when the user select the "Export to Excel' buttom, it opens in Excel. So, is possible to make it to open a Template in Excel where I will have a tab with a macro button on it to create a Pivot Table? So, if the user select the report and export it, instead opening in regular Excel, it will open this Template with the macro, and the macro will pick up the data and create a Pivot Table, is this possible in CF? I just started so I just want to make sure that I don't waste my time trying to do it. Tks Liz
the only work i've ever done combining coldfusion and excel was with cfexcel.. and that was really just generating an excel spreadsheet from query results.. it may be useful for you to google cfexcel though.. i'm not sure if it's something you have to buy
Opening xls files is entirely under the control of the user. If a user does not have their browser configured to open excel files, the page will prompt to download the file. May not make a difference to you, but I just thought I would point out that you cannot control that behavior ;-) If you are dealing with macros you would need to set up a blank template with just the macro. Then use another tool to populate the data sheet used by the macro. I think that is as good as you can get without using COM, which is not something you want to use on a server anyway. I do not know if cfexcel can work with existing files. If not there are a lot of tools that can jExcel, POI, etcetera. Bottom line .. it is possible, but probably not as simple as creating a new file.
You work is already done for you thanks to Ben N. Check out his POI untility: http://www.bennadel.com/projects/poi-utility.htm