zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

couldn't open large file in rails console #126

Closed mib32 closed 9 years ago

mib32 commented 9 years ago

I tried to open in rails console 11MB file using 1.0.1 version of spreadsheet, but lost all of my macbook 4GB RAM and could never finish. Maybe some issues with the file? It is in cyrillic language. This is .xls file: https://drive.google.com/file/d/0BysVPCs2RyX2TGE5NEJZa3lEY3c/view?usp=sharing

zdavatz commented 9 years ago

Please supply me with a pure Ruby test-Script and link it here. No Rails dependencies please. Than I will test with above file on Linux. Thank you.

mib32 commented 9 years ago

You can follow next steps to recreate that:

  1. Open IRB in bash:
antons-macbook:ayu-store antonmur$ irb
  1. Enter next statements:
require 'spreadsheet'
cat = Spreadsheet.open('/Volumes/Macintosh HD/Users/gost/dev/wheelmart/lib/cat_27012015.xls')
zdavatz commented 9 years ago

Sorry but IRB does not work. I need a real Ruby script as a sample to test your file.

kinkou commented 9 years ago

@mib32 Try opening your file this way:

Spreadsheet.open('...'); nil # prevents the output of expression result in console

It's a well-known side effect that generation of text presentation of Spreadsheet object takes lots of time and memory.

mib32 commented 9 years ago

@rastarobot that's true. thanks.

zdavatz commented 9 years ago

Thanks for posting here.

kushalhalder commented 7 years ago

@mib32 how did you solve this issue?

zdavatz commented 7 years ago

I need a script and a testfile to test this. Please supply one, then I can test.