我的代码:
require 'spreadsheet'
Spreadsheet.client_encoding = 'UTF-8'
book = Spreadsheet.open "SearchData1.xls"
puts book
我尝试在 Sublime 中运行它,但出现此错误:
could not locate a workbook, possibly an empty file passed (RuntimeError)
通过命令行运行相同的文件可以正确执行程序而没有错误。谁能帮我弄清楚为什么 Sublime 不能运行这段代码?