lib/excelfile/workbook.rb in rubyfromexcel-0.0.10 vs lib/excelfile/workbook.rb in rubyfromexcel-0.0.13
- old
+ new
@@ -29,15 +29,14 @@
end
def load_worksheets_from(xml)
xml.css("sheet").each do |s|
worksheet_filename = relationships[s['id']]
- worksheet = Worksheet.from_file(worksheet_filename)
- worksheet.name = File.basename(worksheet_filename,'.xml')
- worksheet.workbook = self
+ worksheet = Worksheet.from_file(worksheet_filename,self)
worksheets[worksheet.name] = worksheet
SheetNames.instance[s['name']] = worksheet.name
+ RubyFromExcel.debug(:worksheet_names,"#{worksheet.name}: #{s['name'].inspect}")
worksheet_array << worksheet
puts "Loaded #{worksheet.name} with #{worksheet.cells.size} cells"
end
end
@@ -53,9 +52,10 @@
if defined_name_xml["localSheetId"]
worksheet_array[defined_name_xml["localSheetId"].to_i].named_references[reference_name] = reference
else
named_references[reference_name] = reference
end
+ RubyFromExcel.debug(:named_references,"#{defined_name_xml['name'].inspect} (#{defined_name_xml["localSheetId"]}) -> #{reference_name.inspect} (#{defined_name_xml["localSheetId"] ? worksheet_array[defined_name_xml["localSheetId"].to_i].name.inspect : ""}) -> #{reference_value.inspect}")
end
end
def work_out_dependencies
puts "Working out dependencies..."
\ No newline at end of file