# Must MS-Excel be installed on the machine to ONLY read an MS

**URL:** <https://www.ruby-forum.com/t/must-ms-excel-be-installed-on-the-machine-to-only-read-an-ms/160274>\
**Category:** Ruby\
**Created:** [February 13, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/must-ms-excel-be-installed-on-the-machine-to-only-read-an-ms/160274 "2009-02-13T16:40:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 13, 2009, 4:40pm UTC](https://www.ruby-forum.com/t/must-ms-excel-be-installed-on-the-machine-to-only-read-an-ms/160274/1 "2009-02-13T16:40:39Z")

</div>

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)?

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 13, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/must-ms-excel-be-installed-on-the-machine-to-only-read-an-ms/160274/2 "2009-02-13T16:49:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 13, 2009, 4:59pm UTC](https://www.ruby-forum.com/t/must-ms-excel-be-installed-on-the-machine-to-only-read-an-ms/160274/3 "2009-02-13T16:59:49Z")

</div>

On Fri, Feb 13, 2009 at 4:48 PM, Mario G. [removed\_email\_address@domain.invalid](mailto: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.

...or you can use the Spreadsheet gem:

[http://spreadsheet.rubyforge.org](http://spreadsheet.rubyforge.org)

$\> gem install spreadsheet

hth  
Hannes

---

<div class="post-metadata">

**Author:** ![dasch](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/b2d939/32.png) [@dasch](https://www.ruby-forum.com/u/dasch)\
**Post date:** [February 13, 2009, 5:13pm UTC](https://www.ruby-forum.com/t/must-ms-excel-be-installed-on-the-machine-to-only-read-an-ms/160274/4 "2009-02-13T17:13:22Z")

</div>

Hannes W. wrote:

> On Fri, Feb 13, 2009 at 4:48 PM, Mario G. [removed\_email\_address@domain.invalid](mailto: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.
> 
> ...or you can use the Spreadsheet gem:
> 
> [http://spreadsheet.rubyforge.org](http://spreadsheet.rubyforge.org)
> 
> $\> gem install spreadsheet
> 
> 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!
