# Ruby code to MS Exel 2013

**URL:** <https://rubytalk.org/t/ruby-code-to-ms-exel-2013/69067>\
**Category:** ruby-talk\
**Created:** [29 January 2014 05:33 UTC](https://rubytalk.org/t/ruby-code-to-ms-exel-2013/69067 "2014-01-29T05:33:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [29 January 2014 05:33 UTC](https://rubytalk.org/t/ruby-code-to-ms-exel-2013/69067/1 "2014-01-29T05:33:43Z")

</div>

I've no idea, so I do ask from my Ruby community.

I have an array with more elements. Then I need to store these elements  
in Excel 2013. Say me the steps and requirements if any.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Tamara\_Temple1](https://avatars.discourse-cdn.com/v4/letter/t/5f9b8f/32.png) [@Tamara\_Temple1](https://rubytalk.org/u/Tamara_Temple1)\
**Post date:** [29 January 2014 05:45 UTC](https://rubytalk.org/t/ruby-code-to-ms-exel-2013/69067/2 "2014-01-29T05:45:54Z")

</div>

Simplest might be writing out the Array as a comma-separated value file  
(CSV) and then reading the file into excel.

The ruby CSV library might help:

> **[Class: CSV (Ruby 2.0.0)](https://ruby-doc.org/stdlib-2.0.0/libdoc/csv/rdoc/CSV.html)**
>
> Class : CSV - Ruby 2.0.0

> **···**
>
> On Tue, Jan 28, 2014 at 11:33 PM, Selvag Ruby \<lists@ruby-forum.com\> wrote:
> 
> > I've no idea, so I do ask from my Ruby community.
> > 
> > I have an array with more elements. Then I need to store these elements  
> > in Excel 2013. Say me the steps and requirements if any.
> > 
> > --  
> > Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [29 January 2014 15:55 UTC](https://rubytalk.org/t/ruby-code-to-ms-exel-2013/69067/3 "2014-01-29T15:55:45Z")

</div>

I haven't tried it with Excel 2013 yet, but I wrote a gem called  
"rubyexcel" to interact with Excel 2010: reading 2D arrays or excel  
files, modifying the data, and then outputting to Excel or CSV.

It's here if you want to give it a try.  
Gem: [https://rubygems.org/gems/rubyexcel](https://rubygems.org/gems/rubyexcel)  
Source & Readme: [https://github.com/VirtuosoJoel/RubyExcel](https://github.com/VirtuosoJoel/RubyExcel)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
