# Parse excel file

**URL:** <https://www.ruby-forum.com/t/parse-excel-file/90551>\
**Category:** Rails\
**Created:** [March 29, 2007, 9:56pm UTC](https://www.ruby-forum.com/t/parse-excel-file/90551 "2007-03-29T21:56:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbkbkb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/aeb1de/32.png) [@kbkbkb](https://www.ruby-forum.com/u/kbkbkb)\
**Post date:** [March 29, 2007, 9:56pm UTC](https://www.ruby-forum.com/t/parse-excel-file/90551/1 "2007-03-29T21:56:41Z")

</div>

is there a way to nativley read from and write to an excel (.xls) file  
with Ruby. I want users to be able to upload data from Excel into a  
MySQL database.

---

<div class="post-metadata">

**Author:** ![kbkbkb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/aeb1de/32.png) [@kbkbkb](https://www.ruby-forum.com/u/kbkbkb)\
**Post date:** [March 29, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/parse-excel-file/90551/2 "2007-03-29T22:07:45Z")

</div>

try converting the excel file into csv format first. it will be easy  
then to parse its content and add each line to your desired database.  
thats way you will also be able to implement filters…  
try “save as” in excel and select csv format as file extension

cheers, and hooray my first post here 😃

---

<div class="post-metadata">

**Author:** ![kbkbkb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/aeb1de/32.png) [@kbkbkb](https://www.ruby-forum.com/u/kbkbkb)\
**Post date:** [March 29, 2007, 10:09pm UTC](https://www.ruby-forum.com/t/parse-excel-file/90551/3 "2007-03-29T22:09:48Z")

</div>

gem install spreadsheet-excel  
gem install parseexcel

Fredrik
