在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
require 'win32ole' excel = WIN32OLE.new("excel.application") workbook = excel.Workbooks.Open('D:/test1.xls') worksheet = workbook.Worksheets("test1") worksheet.Select row = worksheet.usedrange.rows.count column = worksheet.usedrange.columns.count worksheet.usedrange.each{|cell| puts cell.value } for i in 1..row do for j in 1..column do puts worksheet.usedrange.cells(i,j).value end end workbook.close excel.Quit 参考:https://www.jianshu.com/p/35d5278dce1e |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论