ruby解析excel常见问题?
PHPz
PHPz 2017-04-21 10:57:07
0
2
911

今天做一脚本用来解析excel如下:
require "rubygems"
require 'parseexcel'
xsl_root = /opt/tool/guest.xsl
workbook = Spreadsheet::ParseExcel.parse xsl_root
worksheet = workbook.worksheet(0)
...
当我运行时出现异常:
default formats are encoded in ISO-8859-1
OLE::UnknownFormatError: OLE::UnknownFormatError
于是到网上google了一下,说是什么excel保存的格式不对,要成2003的那种,试了一下:
文件=>另存为=>*.xsl
再运行脚本同样的问题!
这个情况怎么处理呢?有遇到过相似问题的吗?
0人喜欢

PHPz
PHPz

学习是最好的投资!

reply all(2)
刘奇

If you are on Windows platform, it is recommended to use win32ole
The relevant code can be found here http://lj6684.iteye.com/blog/1415623

伊谢尔伦

You can consider using roo

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template