Problem with using win32ole in Linux server

Hi Every body,

I’m Having one excel file. I want this file using ruby, for this I used
win32ole. Here the code is.

require ‘win32ole’
excel = WIN32OLE.new(‘excel.application’)
excel.visible = false
excel.workbooks.open(‘D:\projects\excel\app\controllers\data.xls’) #
absolute file path
excel.range(‘c25’).value = 45
puts excel.range(‘c25’).value
puts excel.range(‘e10’).value

But the problem is, in linux server I cant use win32ole. Can anybody
suggest what will be the alternate to win32ole in linux server.

Thanks in Advance,
T.Veeraa.

On Dec 15, 2007 12:38 PM, Veera S. [email protected]
wrote:

excel.range(‘c25’).value = 45
puts excel.range(‘c25’).value
puts excel.range(‘e10’).value

But the problem is, in linux server I cant use win32ole. Can anybody
suggest what will be the alternate to win32ole in linux server.

This was discussed already, although quite some time ago.
Basically the idea is either 1. run excel under wine (or on a windows
box) and communicate with linux using drb, or 2. using openoffice to
open the excel file.
There’s a ruby lib to read excel files too (parseexcel). I don’t know
if there’s one for writing.

Yes, but if you use OpenOffice, how do you script it? Does Ruby have a
library that works with OO?

Ron

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs