views:

128

answers:

1

I know what you're thinking, just download the data as a CSV and import into Excel.

Unfortunately what we require is for a user to choose some data from a Rails app then easily (i.e. with as little user intervention as possible - ideally a single button press) export it, and open it in an existing Excel spreadsheet that contains various formulas and macros, etc, which will be applied to the data.

My ideal solution would involve most of the heavy lifting at the Rails end, as that's where my skills lie, but I guess there could be some sort of Excel web integration stuff that might help.

Anyway, can I have some recommendations on good approaches to this?

+1  A: 

The export part is reasonably well covered at least - here's a couple of candidate gems:

I suspect (hope!) that once you have your data in XLS form, the rest should be plumbing on the client side.

Is there any value in looking at Excel's Web Query facility? If the user can define their selection criteria such that change is infrequent, then a custom page (perhaps just delivering a table) could drop the data straight into their Excel session. Just a thought...

Mike Woodhouse
Thanks - these were the lines I was thinking along. Unfortunately by definition the data will be different on each request. So in some way the Excel web query bit would need to interact with the Web UI bit where they choose the data.
DanSingerman