# Gem for import/export XLS files?

**URL:** <https://rubytalk.org/t/gem-for-import-export-xls-files/73667>\
**Category:** ruby-talk\
**Created:** [14 June 2016 15:42 UTC](https://rubytalk.org/t/gem-for-import-export-xls-files/73667 "2016-06-14T15:42:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastien\_Puyet1](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Sebastien\_Puyet1](https://rubytalk.org/u/Sebastien_Puyet1)\
**Post date:** [14 June 2016 15:42 UTC](https://rubytalk.org/t/gem-for-import-export-xls-files/73667/1 "2016-06-14T15:42:57Z")

</div>

Hi everyone,

I'm currently looking for a gem able to read/write XLS/XLSX files. I've  
spent a lot of time on google and i found nothing fulfilling the above  
criteria.

Anyone have an idea ?

Best regards,

Sébastien

---

<div class="post-metadata">

**Author:** ![Victor\_Shepelev](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/victor_shepelev/32/1899_2.png) [@Victor\_Shepelev](https://rubytalk.org/u/Victor_Shepelev)\
**Post date:** [14 June 2016 15:55 UTC](https://rubytalk.org/t/gem-for-import-export-xls-files/73667/2 "2016-06-14T15:55:28Z")

</div>

Not an easy question.  
In fact, there are SEVERAL questions:  
1) extract rough data infromation (text/numbers) from Excel files  
2) extract precise information (including formatting, charts and so on)  
3) create Excel files from scratch  
4) edit existing Excel files (open/change/save cycle)

That gives you 4. Then, you can multiply it by 2 (XLS vs XLSX) and you'll  
receive approximate number of tasks you need to solve 🙂 If it is not all 8  
of them, your life is a bit easier.

Basically, (1), and some part of (2) -- read rough info -- is solved by  
gems like roo or spreadsheet  
If you need (2) -- full-featured reading, there is recent gem, released by  
OnlyOffice: [GitHub - ONLYOFFICE/ooxml\_parser: Ruby OOXML Parser](https://github.com/ONLYOFFICE/ooxml_parser) -- though, I haven't  
checked it in real life.  
Then, if you need (3) -- creating of files -- for XLSX there are axlsx  
and write\_xlsx. For XLS my best guess, from real-life experience is  
RJB+JExcelApi.  
And for (4) -- ...I really don't know. RJB+JExcelApi may work for you or  
may not, as well as write\_xlsx.

Finally, If you are on Windows, the things became 1000% easier and you can  
just use Win23OLE module and do everything you want with your Excel files,  
whilst you have MS Office installed.

Hope that helps.  
Feel free to ask additional questions, I'm not an expert but have spent  
significant amount of time on those matters.

V.

> **···**
>
> 2016-06-14 18:42 GMT+03:00 Sébastien Puyet \<sebastienpuyet@gmail.com\>:
> 
> > Hi everyone,
> > 
> > I'm currently looking for a gem able to read/write XLS/XLSX files. I've  
> > spent a lot of time on google and i found nothing fulfilling the above  
> > criteria.
> > 
> > Anyone have an idea ?
> > 
> > Best regards,
> > 
> > Sébastien
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);

---

<div class="post-metadata">

**Author:** ![Sebastien\_Puyet1](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Sebastien\_Puyet1](https://rubytalk.org/u/Sebastien_Puyet1)\
**Post date:** [14 June 2016 16:31 UTC](https://rubytalk.org/t/gem-for-import-export-xls-files/73667/3 "2016-06-14T16:31:01Z")

</div>

Thinking through (thanks to you), what i really need is read/edit/create  
XLSX files. Charts and formatting doesn't matter. The roo gem seems good  
for my need.

Thanks for your time Victor !

Sébastien

> **···**
>
> 2016-06-14 17:55 GMT+02:00 Victor Shepelev \<zverok.offline@gmail.com\>:
> 
> > Not an easy question.  
> > In fact, there are SEVERAL questions:  
> > 1) extract rough data infromation (text/numbers) from Excel files  
> > 2) extract precise information (including formatting, charts and so on)  
> > 3) create Excel files from scratch  
> > 4) edit existing Excel files (open/change/save cycle)
> > 
> > That gives you 4. Then, you can multiply it by 2 (XLS vs XLSX) and you'll  
> > receive approximate number of tasks you need to solve 🙂 If it is not all 8  
> > of them, your life is a bit easier.
> > 
> > Basically, (1), and some part of (2) -- read rough info -- is solved by  
> > gems like roo or spreadsheet  
> > If you need (2) -- full-featured reading, there is recent gem, released by  
> > OnlyOffice: [GitHub - ONLYOFFICE/ooxml\_parser: Ruby OOXML Parser](https://github.com/ONLYOFFICE/ooxml_parser) -- though, I  
> > haven't checked it in real life.  
> > Then, if you need (3) -- creating of files -- for XLSX there are axlsx  
> > and write\_xlsx. For XLS my best guess, from real-life experience is  
> > RJB+JExcelApi.  
> > And for (4) -- ...I really don't know. RJB+JExcelApi may work for you or  
> > may not, as well as write\_xlsx.
> > 
> > Finally, If you are on Windows, the things became 1000% easier and you can  
> > just use Win23OLE module and do everything you want with your Excel files,  
> > whilst you have MS Office installed.
> > 
> > Hope that helps.  
> > Feel free to ask additional questions, I'm not an expert but have spent  
> > significant amount of time on those matters.
> > 
> > V.
> > 
> > 2016-06-14 18:42 GMT+03:00 Sébastien Puyet \<sebastienpuyet@gmail.com\>:
> > 
> > > Hi everyone,
> > > 
> > > I'm currently looking for a gem able to read/write XLS/XLSX files. I've  
> > > spent a lot of time on google and i found nothing fulfilling the above  
> > > criteria.
> > > 
> > > Anyone have an idea ?
> > > 
> > > Best regards,
> > > 
> > > Sébastien
> > > 
> > > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
> > 
> > Unsubscribe: \<mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe\>  
> > \<[http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt](http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt);
