Displaying 4 results from an estimated 4 matches for "parsed_file".
Did you mean:
parse_file
2011 Feb 02
1
Roo gem performance problems
I am getting unacceptable performace problems by using the roo gem for
reading a file by using XLSX or XLS library from this gem.
Someone may suggest me an alternative about how to parse an .XLSX file?
<code>
parsed_file = Excel.new(filename,false, :ignore) if (file_format.upcase
== "XLS")
parsed_file = Excelx.new(filename,false, :ignore) if
(file_format.upcase == "XLSX")
raise t "#{filename} is not an Excel file!" if (!parsed_file)
parsed_file.default_sheet =
parsed...
2011 Aug 03
2
Malformed CSV Error
Hello,
I am getting error :-
#<CSV::MalformedCSVError: Unclosed quoted field on line 1892.>.
I have following code :-
--------------------------------------------------
@parsed_file =
CSV.open("#{RAILS_ROOT}/private/sales_report_files/#{@file_folder}/#{@sub_file_folder}/#{@file_name.filename}",''r'',:col_sep
=>?\t)
@parsed_file.each_with_index do |row, index| # getting error on this
line
// some code
end
-------------------------------------...
2008 Feb 16
2
NoMethodError... but its not a method!
...for="dump_file">Select a Provider CSV File :</label>
<%= f.file_field :file -%>
<%= submit_tag ''Submit'' -%>
<% end -%>
Perhaps it is a naming problem? I am not sure. My controller looks like
this:
def bes
@currenttime = Time.now
@parsed_file = FasterCSV::parse(params[:dump][:file])
@parsed_file.shift
n=0
@parsed_file.each do |row|
c=Bes.new
c.bes_id=row[0]
# There are a bunch more of these lines, but this part works.
c.bes_handheldconfigid=row[21]
@besnumber = Bes.new params[:bes]
if c.save
n=n+1
GC.start if n%...
2009 Oct 23
2
Deployment syntax error: fine in dev - what's happening?
...m_original_require'':
/Library/WebServer/staging.givetothem.co.uk/releases/20091023133654/app/controllers/bulkimport_controller.rb:32:
syntax error, unexpected kRESCUE, expecting kEND (SyntaxError)
rescue Exception
^
The code generating the error is:
begin
@parsed_file=CSV::Reader.parse(params[:dump][:file])
n=0
@parsed_file.each do |row|
unless row[0].nil?
c=@recipients.new
c.address=row[0]
if c.save
n=n+1
GC.start if n%50==0
end
end
rescue Exception
fla...