lib/saxlsx/workbook.rb in saxlsx-0.2.0 vs lib/saxlsx/workbook.rb in saxlsx-0.3.0
- old
+ new
@@ -17,19 +17,23 @@
def close
@file_system.close
end
def sheets(name=nil)
- @sheets ||= SheetCollection.new(@file_system, shared_strings).to_a
+ @sheets ||= SheetCollection.new(@file_system, self).to_a
name.nil? ? @sheets : @sheets.detect { |s| s.name == name }
end
def sheet_names
sheets.map(&:name)
end
def shared_strings
@shared_strings ||= SharedStringCollection.new(@file_system).to_a
+ end
+
+ def number_formats
+ @number_formats ||= StyleCollection.new(@file_system).to_a
end
def to_csv(path)
sheets.each { |s| s.to_csv path }
end
\ No newline at end of file