lib/write_xlsx/workbook.rb in write_xlsx-0.89.0 vs lib/write_xlsx/workbook.rb in write_xlsx-0.90.0

- old
+ new

@@ -202,10 +202,18 @@ args.collect{|i| @worksheets[i] } end end # + # Return a worksheet object in the workbook using the sheetname. + # + def worksheet_by_name(sheetname = nil) + sheets.select { |s| s.name == sheetname }.first + end + alias get_worksheet_by_name worksheet_by_name + + # # Set the date system: false = 1900 (the default), true = 1904 # # Excel stores dates as real numbers where the integer part stores # the number of days since the epoch and the fractional part stores # the percentage of the day. The epoch can be either 1900 or 1904. @@ -804,10 +812,10 @@ params.each_key do |key| return -1 unless valid.has_key?(key) end # Set the creation time unless specified by the user. - params[:created] = @local_time unless params.has_key?(:created) + params[:created] = @createtime unless params.has_key?(:created) @doc_properties = params.dup end #