Problem with using win32ole in Linux server.

V

Veera Sundaravel

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.
 
J

Jano Svitok

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.

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.
 
S

Steckly, Ron

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

Ron

-----Original Message-----
From: Jano Svitok [mailto:[email protected]]=20
Sent: Saturday, December 15, 2007 6:54 AM
To: ruby-talk ML
Subject: Re: 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 =3D WIN32OLE.new('excel.application')
excel.visible =3D false
excel.workbooks.open('D:\projects\excel\app\controllers\data.xls') #
absolute file path
excel.range('c25').value =3D 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top