file ext
This commit is contained in:
parent
69b9cb54c7
commit
60e43b20b9
1 changed files with 9 additions and 1 deletions
|
@ -70,7 +70,15 @@ module FoodsoftArticleImport
|
||||||
opts[:csv_options][:encoding] = encoding if encoding
|
opts[:csv_options][:encoding] = encoding if encoding
|
||||||
opts[:csv_options][:col_sep] = col_sep if col_sep
|
opts[:csv_options][:col_sep] = col_sep if col_sep
|
||||||
opts[:csv_options][:liberal_parsing] = true if liberal_parsing
|
opts[:csv_options][:liberal_parsing] = true if liberal_parsing
|
||||||
opts[:extension] = File.extname.File.basename(filename) if filename
|
opts[:extension] = File.extname(File.basename(filename)) if filename
|
||||||
|
puts "
|
||||||
|
" + "______________" + "
|
||||||
|
" + "______________" + "
|
||||||
|
" + "______ext________" + "
|
||||||
|
" + "#{opts[:extension]}" + "
|
||||||
|
" + "______________"+ "
|
||||||
|
" + "______________"+ "
|
||||||
|
" + "______________"
|
||||||
begin
|
begin
|
||||||
Roo::Spreadsheet.open(file, **opts)
|
Roo::Spreadsheet.open(file, **opts)
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
|
|
Loading…
Reference in a new issue