Sha256: 1cb2e38b0dea368ba85d829f2d78120c04d5828a4203c8852fe506df4ae37834
Contents?: true
Size: 629 Bytes
Versions: 10
Compression:
Stored size: 629 Bytes
Contents
require 'roo' module QME module Measure # Utility class for converting NQF XLS files to JSON class Converter #Convert an NQF XLS file to a hash def self.from_xls(file) xls =Excelx.new(file) xls.default_sheet='Measure_QDS' result = {} (xls.header_line+1..xls.last_row).each do |row| entry = {} (xls.first_column..xls.last_column).each do |column| entry[xls.cell(xls.header_line, column)] = xls.cell(row, column) end result[entry['QDS_id']] = entry end result end end end end
Version data entries
10 entries across 10 versions & 1 rubygems