rubyXL 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rubyXL/workbook.rb +2 -2
- data/lib/rubyXL/writer/worksheet_writer.rb +15 -5
- data/rubyXL.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.7
|
data/lib/rubyXL/workbook.rb
CHANGED
@@ -23,7 +23,7 @@ module RubyXL
|
|
23
23
|
SHEET_NAME = 'Sheet1'
|
24
24
|
def initialize(worksheets=[], filepath=nil, creator=nil, modifier=nil, created_at=nil,
|
25
25
|
company='', application=APPLICATION,
|
26
|
-
appversion=APPVERSION,
|
26
|
+
appversion=APPVERSION, date1904=0)
|
27
27
|
if worksheets.nil? || worksheets.empty?
|
28
28
|
@worksheets = [Worksheet.new(self,SHEET_NAME)]
|
29
29
|
else
|
@@ -46,7 +46,7 @@ module RubyXL
|
|
46
46
|
@calc_chain = nil #unnecessary?
|
47
47
|
@num_strings = 0 #num strings total
|
48
48
|
@size = 0 #num strings in shared_strings array
|
49
|
-
@
|
49
|
+
@date1904 = date1904
|
50
50
|
@external_links = nil
|
51
51
|
@style_corrector = nil
|
52
52
|
@drawings = nil
|
@@ -113,11 +113,21 @@ module Writer
|
|
113
113
|
end
|
114
114
|
|
115
115
|
@worksheet.row_styles[(i+1).to_s][:style] = @workbook.style_corrector[@worksheet.row_styles[(i+1).to_s][:style].to_s]
|
116
|
-
|
117
|
-
'
|
118
|
-
'
|
119
|
-
'
|
120
|
-
|
116
|
+
row_opts = {
|
117
|
+
'r'=>(i+1).to_s,
|
118
|
+
'spans'=>'1:'+row.size.to_s,
|
119
|
+
'customFormat'=>custom_format
|
120
|
+
}
|
121
|
+
unless @worksheet.row_styles[(i+1).to_s][:style].to_s == ''
|
122
|
+
row_opts['s'] = @worksheet.row_styles[(i+1).to_s][:style].to_s
|
123
|
+
end
|
124
|
+
unless @worksheet.row_styles[(i+1).to_s][:height].to_s == ''
|
125
|
+
row_opts['ht'] = @worksheet.row_styles[(i+1).to_s][:height].to_s
|
126
|
+
end
|
127
|
+
unless @worksheet.row_styles[(i+1).to_s][:customheight].to_s == ''
|
128
|
+
row_opts['customHeight'] = @worksheet.row_styles[(i+1).to_s][:customHeight].to_s
|
129
|
+
end
|
130
|
+
xml.row(row_opts) {
|
121
131
|
row.each_with_index do |dat, j|
|
122
132
|
unless dat.nil?
|
123
133
|
#TODO do xml.c for all cases, inside specific.
|
data/rubyXL.gemspec
CHANGED
metadata
CHANGED