15 Jul '12, 8pm

ASCIIcast 362 - Exporting CSV and Excel

We can use an HTML table that contains the data we want to export as Excel has no problem displaying these. When we open this up in Excel we’ll see that the encoding problem has disappeared and data containing newlines is handled correctly, too. The spreadsheet looks a little different, though, as the HTML formatting adds a border to the cells and centre-aligns the header cells. We can customize this in the HTML document if we want any formatting we add will be shown in Excel. If we want to generate a file that feels more like a native Excel document we can change our template to look like this:

Full article: http://railscasts.com/episodes/362-exporting-csv-and-exce...

Tweets

“#362 Exporting CSV and Excel - RailsCasts”

railscasts.com 16 Jul '12, 3am

As you will see it is easy to add a CSV export option to Rails. Here I also show how to export for Excel in a variety of f...

#362 Exporting CSV and Excel - RailsCasts

railscasts.com 24 Jul '12, 4am

We can use an HTML table that contains the data we want to export as Excel has no problem displaying these. When we open t...

Episode 362: Exporting CSV and Excel

railscasts.com 02 Jul '12, 7am

As you will see it is easy to add a CSV export option to Rails. Here I also show how to export for Excel in a variety of f...

#axlsx almost made it into a rails cast

railscasts.com 03 Jul '12, 12am

Thanks Yannick. It has been a true community effort. Huge respect to the people out there who forked and added the feature...