Forum: Ruby Must MS-Excel be installed on the machine to ONLY read an MS

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Daniel S. (Guest)
on 2009-02-13 17:40
Must MS-Excel be installed on the machine to ONLY read an MS-Excel
worksheet file (e.g. TEST.XLS) with Ruby (using Ruby's win32ole
library)?
Mario G. (Guest)
on 2009-02-13 17:49
Daniel Summars wrote:
> Must MS-Excel be installed on the machine to ONLY read an MS-Excel
> worksheet file (e.g. TEST.XLS) with Ruby (using Ruby's win32ole
> library)?

Yes. Win32OLE works with the host app, in this case Excel. You probably
want a COM library that can read/write excel spreadsheets directly. I
think there are free ones out there but it depends on what features and
excel version support you need.
Hannes W. (Guest)
on 2009-02-13 17:59
(Received via mailing list)
On Fri, Feb 13, 2009 at 4:48 PM, Mario G. <removed_email_address@domain.invalid>
wrote:
> Daniel Summars wrote:
>> Must MS-Excel be installed on the machine to ONLY read an MS-Excel
>> worksheet file (e.g. TEST.XLS) with Ruby (using Ruby's win32ole
>> library)?
>
> Yes. Win32OLE works with the host app, in this case Excel. You probably
> want a COM library that can read/write excel spreadsheets directly. I
> think there are free ones out there but it depends on what features and
> excel version support you need.

<ShamelessPlug>
...or you can use the Spreadsheet gem:

http://spreadsheet.rubyforge.org

$> gem install spreadsheet
</ShamelessPlug>

hth
Hannes
Daniel S. (Guest)
on 2009-02-13 18:13
Hannes W. wrote:
> On Fri, Feb 13, 2009 at 4:48 PM, Mario G. <removed_email_address@domain.invalid>
> wrote:
>> Daniel Summars wrote:
>>> Must MS-Excel be installed on the machine to ONLY read an MS-Excel
>>> worksheet file (e.g. TEST.XLS) with Ruby (using Ruby's win32ole
>>> library)?
>>
>> Yes. Win32OLE works with the host app, in this case Excel. You probably
>> want a COM library that can read/write excel spreadsheets directly. I
>> think there are free ones out there but it depends on what features and
>> excel version support you need.
>
> <ShamelessPlug>
> ...or you can use the Spreadsheet gem:
>
> http://spreadsheet.rubyforge.org
>
> $> gem install spreadsheet
> </ShamelessPlug>
>
> hth
> Hannes

Hannes W. and Mario Gutierre,

Thank you both.
Both answers are very helpful.
I'm also thinking it would make a lot of sense too if the provider of
the spreadsheets simply saved them to CSV files too. Then we probably
really don't need MS-Excel at all.

Thanks again!
This topic is locked and can not be replied to.