Prev | Current Page 328 | Next

David Berube

"Practical Reporting with Ruby and Rails"


A number of other possibilities for working with Word are available. For example,
you can use Word to do a mail merge from, say, a dynamically generated Excel document,
as in the example in Chapter 4. Or, you can create a template .doc file, open it, and
replace keywords with dynamically generated data. For details on the various ways you
can use Microsoft Word, see the MSDN documentation at http://msdn2.microsoft.com/
en-us/library/kw65a0we(VS.80).aspx. You??™ll need to translate the code from the languages
these techniques provide into Ruby, but as demonstrated in Listing 12-1, that??™s reasonably
straightforward.
CHAPTER 12 n CREATING REPORTS WITH RUBY AND MICROSOFT OFFICE 235
Figure 12-1. Importing data into Word with Win32OLE
Working with Microsoft Access
To exportMicrosoft Access files, you can use MDB Tools (http://mdbtools.sourceforge.
net/), an open source project. You can use MDB to convert Access databases (which have
the extension .mdb, hence the name MDB Tools) to a more open database architecture,
such as PostgreSQL or MySQL.


Pages:
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
Mafia Paul McCartney Maciej Maleńczuk Michał Lorenc Ludacris