2
時使用電子表格寶石打開電子表格時,我得到以下錯誤:錯誤使用電子表格寶石
/usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/reader.rb:73:in `block in encoding': Unknown Codepage 0xc24a (RuntimeError)
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/reader.rb:72:in `fetch'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/reader.rb:72:in `encoding'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/reader.rb:197:in `read_codepage'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/reader.rb:788:in `read_workbook'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/reader.rb:122:in `read'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet/excel/workbook.rb:32:in `open'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet.rb:62:in `open'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/spreadsheet-0.6.5.4/lib/spreadsheet.rb:68:in `open'
from worksheet_demo.rb:3:in `<main>'
什麼代碼導致錯誤?我最好的選擇是你試圖打開一個受密碼保護的電子表格。在這種情況下,請嘗試刪除密碼保護並查看它是否有效。 – user2398029 2012-03-05 03:22:31
是的,你是對的。但我不知道如何刪除電子表格中的密碼保護。請幫助我,如果你知道 – gyan 2012-03-07 07:15:07
只是張貼更多的信息作爲答案:) – user2398029 2012-03-07 15:19:25