+ Start a Discussion

How do I renderize a VisualForce Page as an Excel file in Internet Explorer?

I have a VisualForce page with a table. My costumer wants to be able to download it as an Excel file, using Internet Explorer. I've tried using the contenttype="application/vnd.ms-excel" resource in the "page" tag, but doesn't work.


There's no way to convince my costumer to change its browser... how could I do?

John De SantiagoJohn De Santiago

Not sure if it helps but excel usually takes ownership of the ".csv" extension on Windows machines. So if you create a CSV file your customer should be able to just double-click on that file and Excel will automatically open it up and import it. But you would basically forgo creating any html and just write a CSV formatted strings to the page.


It does, however, mean that your formatting will not be carried over. So if its a formatted document he is looking for that is likely going to be an issue. It would be a raw extract similar to the report export to CSV.