On Wednesday 13 June 2007 15:04, Boyd Stephen Smith Jr. wrote:
> I am.
>
> Here's a script that will dump a worksheet as a csv.  Save, chmod a+x, and
> invoke like name_of_script name_of_excel_file worksheet_number > csv_file
> (e.g. ./convertxls price_list.xls 0 > price_list.csv):
>
> #! /usr/bin/ruby
> require 'parseexcel'
>
> wb = Spreadsheet::ParseExcel.parse(ARGV.shift)
> ws = workbook.worksheet(ARGV.shift.to_i)
> ws.each { |row|
>   puts row.collect { |cell|
>     '"' + cell.to_s.gsub(/"/, '""') + '"'
>   }.join(',')
> }
>
> Clearly, all the heavy lifting is done by that library, which you will need
> to run this script. 

This script doesn't work for me :(
I have ruby & parseexcel installed...

$ ./excel2cvs.rb complect.xls 0 > complect.cvs 
./excel2cvs.rb:5: undefined local variable or method `workbook' for 
main:Object (NameError)



-- 
best regards,
Aleksey V. Kunitskiy
-- 
[EMAIL PROTECTED] mailing list

Reply via email to