From: Wayne Brissette Date: 2013-02-01T19:22:14+09:00 Subject: Re: Reading and looping through Excel --Apple-Mail=_6087DD60-9C7A-4BB7-AD4B-455D770110CA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 I played around with this gem and it's very nice. However, it doesn't = seem to like the newer Excel formats (XML).=20 What are people doing with these newer .xlsx formatted files? I can do a = 'save as', then the gem works fine, but that seems to be = counter-productive if I was trying to deploy something like this to my = department.=20 Wayne On Jan 24, 2013, at 4:50 PM, Siddharth Venkatesan wrote: > +1 on the spreadsheet gem. It makes excel file reading such a trivial = task.=20 >=20 > On Thursday, January 24, 2013, Dix wrote: > I've done something similar using the spreadsheet gem, it's easy to = open a workbook and iterate over the rows extracting what you want >=20 > here's the guide > http://spreadsheet.rubyforge.org/files/GUIDE_txt.html >=20 >=20 > To open all the files: >=20 > dir =3D "./yourdirectory/" > files =3D Dir.entries(dir) >=20 > files. each do |file|=20 > book =3D Spreadsheet.open dir + file > sheet =3D book.worsheet 0 >=20 > =85=85. your work >=20 > end >=20 >=20 >=20 > --=20 > Pablo >=20 --Apple-Mail=_6087DD60-9C7A-4BB7-AD4B-455D770110CA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252
+1 on the spreadsheet gem. It makes excel file reading = such a trivial task. 

On Thursday, January 24, = 2013, Dix wrote:
I've done something similar using the spreadsheet = gem, it's easy to open a workbook and iterate over the rows extracting = what you want

here's the = guide
http://spreadsheet.rubyforge.org/files/GUIDE_txt.html


To open all the = files:

dir =3D "./yourdirectory/"
files =3D= Dir.entries(dir)

files. each do = |file| 
  = book =3D Spreadsheet.open dir + file
  sheet =3D = book.worsheet 0

   =85=85. your = work

end



-- 
Pablo

<= br>= --Apple-Mail=_6087DD60-9C7A-4BB7-AD4B-455D770110CA--