http://spreadsheet.rubyforge.org/files/GUIDE_txt.html
To get started with Ruby Spreadsheet hit the above link.
http://spreadsheet.rubyforge.org/files/GUIDE_txt.html
To get started with Ruby Spreadsheet hit the above link.
RSS feed for comments on this post. TrackBack URI
THis could be useful if that link would be live.. jeeesus what a documentation is this? I need information about this spreadsheet gem and it’s soo hard to get it
Comment by LUbomir Herko — May 24, 2010 @ 4:45 pm
Maybe this is what you looking for (http://spreadsheet.rubyforge.org/GUIDE_txt.html)
Comment by Foton — June 4, 2010 @ 3:09 pm
Sorry for the bad documentation. We are working on it to improve it.
Comment by zdavatz — December 7, 2010 @ 3:00 pm
Why on earth did you move away from github? source and really hard to find.
Comment by Charles Lowell — December 15, 2010 @ 10:09 pm
We never where on Github. See http://spreadsheet.rubyforge.org/ the source is and was always here: http://scm.ywesee.com/?p=spreadsheet/.git;a=summary
The new gem is out as well.
Comment by zdavatz — December 16, 2010 @ 7:17 am
Consider moving to GitHub 🙂
Comment by Vijay Dev — May 4, 2011 @ 2:22 pm
If you have a patch or a bug post it on gist.github.com and send the link to the Mailinglist. http://groups.google.com/group/rubyspreadsheet
Thank you!
Comment by zdavatz — May 4, 2011 @ 2:43 pm
Anybody have problems after reading a file and then the file is locked? I cant seem to find anything in the documentation about closing the workbook or the file.
importPath = File.join(RAILS_ROOT, ‘temp_uploads’, “temp.xls”)
book = Spreadsheet.open “#{importPath}”
sheet = book.worksheet 0
counter = 0
sheet.each do |row|
if counter > 0
newBike = bike_from_row(row, counter)
end
counter += 1
end
Comment by Ethan — February 8, 2011 @ 5:14 pm
You need to write the file, see: http://spreadsheet.rubyforge.org/GUIDE_txt.html
Comment by zdavatz — February 8, 2011 @ 5:52 pm
Hi,
I want to use Spreadsheet to collate a bunch of sheets, so that I copy rows from x number of sheets and dump them into newly created sheets based on certain criteria.
Opening, reading, extracting the rows, and the initial creation of the ‘dump’ sheets is not a problem (all nice and easy), but when Spreadsheet opens a sheet created with Spreadsheet and inserts a row, then writes the file, I am no longer able to open the spreadsheet with either excel or open office – when I try I get an invalid file format message.
I don’t get any errors when running my cukes (apart from trying to open the files manually later), but when I run the program from the cmd line, I get the following runtime error:
/.rvm/gems/ruby-1.9.2-p290@account_manager/gems/spreadsheet-0.6.5.7/lib/spreadsheet/excel/workbook.rb:60:in `block in biff_version’: Unkown BIFF_VERSION ” (RuntimeError)
If I start an IRB session and try to open the sheet with Spreadsheet, I get the same error.
I presume I am missing something when it comes to writing the file a second time?
Any ideas?
Many Thanks
Paul
Comment by Paul Hollyer — September 4, 2011 @ 7:59 pm
Did you search the mailing list http://groups.google.com/group/rubyspreadsheet? This is a known “feature”. Modifying an XLS with several worksheets will result in not being able to open the modified file if you only modify one worksheet but do not rewrite the untouched worksheets (the ones that you did not modify). All worksheets have to be rewritten (or deleted if empty) if you modify a file with the spreadsheet gem.
Comment by zdavatz — September 5, 2011 @ 8:54 am
Thanks for the reply, you’re right, I should have gone to the group…
Each created XLS file only has one worksheet, and after opening I am simply appending another row then writing the file.
I’ll do a bit more digging, and post on the group if necessary.
Thanks
Comment by Paul Hollyer — September 13, 2011 @ 2:00 pm
Just in case anyone else comes across this, I found my problem – I was writing to the same file because I need to maintain the file names and locations, then I read in the help files that it wasn’t a good idea to do that!
The fix was to delete the file prior to writing.
I have added a Gist here [1] for anyone else to have a look at for similar issues.
Hope it helps others.
Paul
[1] https://gist.github.com/1214475
Comment by Paul Hollyer — September 13, 2011 @ 5:48 pm
I’m trying to use spreadsheet to read from an xls doc and write the contents to an html file. The writing to html file part, I’ve got, but I’m having trouble getting the exact row and columns I need stored into a variable so I can write with it. Any help getting rows and columns would be appreciated.
Comment by rai — February 13, 2012 @ 6:00 pm
book = Spreadsheet.open ‘\some\path\to\file.xls’
current = book.worksheet 0
Or if you want
current = book.worksheet ‘SheetName’
then
rowC = current.row(2)
Now you have an array to work with. Column 1 is then rowC[0], column 2 is rowC[1], etc
Convert as necessary.
Comment by t4t0nk4 — March 20, 2013 @ 10:21 pm
hello, rubyforge is not available now. i need doc
Comment by Kostyarin Ivanoff — June 9, 2014 @ 10:04 am
Get it from github.com: https://github.com/zdavatz/spreadsheet/blob/master/GUIDE.md
Comment by zdavatz — June 9, 2014 @ 10:25 am
Thanks zdavatz!
Comment by David McDonald (@daveomcd) — November 5, 2014 @ 7:18 pm