Prev | Current Page 324 | Next

David Berube

"Practical Reporting with Ruby and Rails"


Let??™s look at some ways that you can create reports that interact with these familiar
Microsoft Office programs.
233
C H A P T E R 1 2
Working with Microsoft Excel
Suppose you need to read data supplied in a Microsoft Excel file. Since this is a proprietary,
closed format, there??™s no easy way to parse it. Fortunately, others in the open
source community have already done the work in the form of the parseexcel gem.
(Unfortunately, the parse-excel gem did not work with the Excel files I generated while
writing this chapter, so I cannot recommend this technique at this time; however, by the
time you read this, the situation may have changed.)
If you simply want to display an Excel spreadsheet in the browser, you can consider
using unexcel, which is an open source Perl script that takes Excel files and converts them
to HTML. You can find this tool at http://sourceforge.net/projects/unexcel.
When you need to directly export data to Excel, you can use the spreadsheet-excel
gem, as discussed in detail in Chapter 4.


Pages:
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
doktorat lampy ogrodowe określić zakłady bukmacherskie Wczasy nad morzem