in reply to Redirect to an XLSX spreadsheet
Another alternative may be limit your HTML to a set that Excel recognizes, along with an appropriate content header. Then they can see the spreadsheet on the screen, and if they download it, it can save to a file with an .xls extension. I've done it before, and it worked very nicely. I don't recall what the stripped down HTML is, off the top of my head, but I can tell you how I got to it.
I simply created a spreadsheet with the formatting I wanted, and saved it as HTML. Then, I started chopping out the "cruft" bits (of which there are many), paring it down until Excel would still open it successfully, and simple enough to generate.
Note: This technique may not be acceptable in todays .CSS / dynamic / whizz-bang web application world, though.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|