writeexcel 0.6.9 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. data/README.rdoc +2 -0
  2. data/VERSION +1 -1
  3. data/lib/writeexcel/biffwriter.rb +29 -43
  4. data/lib/writeexcel/cell_range.rb +332 -0
  5. data/lib/writeexcel/chart.rb +50 -51
  6. data/lib/writeexcel/col_info.rb +87 -0
  7. data/lib/writeexcel/comments.rb +456 -0
  8. data/lib/writeexcel/convert_date_time.rb +117 -0
  9. data/lib/writeexcel/data_validations.rb +370 -0
  10. data/lib/writeexcel/debug_info.rb +5 -1
  11. data/lib/writeexcel/embedded_chart.rb +35 -0
  12. data/lib/writeexcel/format.rb +1 -1
  13. data/lib/writeexcel/formula.rb +3 -3
  14. data/lib/writeexcel/helper.rb +3 -0
  15. data/lib/writeexcel/image.rb +61 -1
  16. data/lib/writeexcel/olewriter.rb +2 -8
  17. data/lib/writeexcel/outline.rb +24 -0
  18. data/lib/writeexcel/shared_string_table.rb +153 -0
  19. data/lib/writeexcel/workbook.rb +86 -444
  20. data/lib/writeexcel/worksheet.rb +693 -2029
  21. data/lib/writeexcel/worksheets.rb +25 -0
  22. data/lib/writeexcel/write_file.rb +34 -15
  23. data/test/test_02_merge_formats.rb +0 -4
  24. data/test/test_04_dimensions.rb +0 -4
  25. data/test/test_05_rows.rb +0 -4
  26. data/test/test_06_extsst.rb +3 -6
  27. data/test/test_11_date_time.rb +0 -4
  28. data/test/test_12_date_only.rb +262 -231
  29. data/test/test_13_date_seconds.rb +0 -4
  30. data/test/test_21_escher.rb +71 -84
  31. data/test/test_22_mso_drawing_group.rb +0 -4
  32. data/test/test_23_note.rb +5 -21
  33. data/test/test_24_txo.rb +6 -7
  34. data/test/test_25_position_object.rb +0 -4
  35. data/test/test_26_autofilter.rb +0 -5
  36. data/test/test_27_autofilter.rb +0 -5
  37. data/test/test_28_autofilter.rb +0 -5
  38. data/test/test_29_process_jpg.rb +1 -1
  39. data/test/test_30_validation_dval.rb +4 -7
  40. data/test/test_31_validation_dv_strings.rb +9 -12
  41. data/test/test_32_validation_dv_formula.rb +11 -14
  42. data/test/test_42_set_properties.rb +0 -3
  43. data/test/test_50_name_stored.rb +0 -4
  44. data/test/test_51_name_print_area.rb +0 -4
  45. data/test/test_52_name_print_titles.rb +0 -4
  46. data/test/test_53_autofilter.rb +0 -4
  47. data/test/test_60_chart_generic.rb +42 -46
  48. data/test/test_61_chart_subclasses.rb +7 -11
  49. data/test/test_62_chart_formats.rb +12 -16
  50. data/test/test_63_chart_area_formats.rb +3 -7
  51. data/test/test_biff.rb +0 -4
  52. data/test/test_big_workbook.rb +17 -0
  53. data/test/test_format.rb +0 -3
  54. data/test/test_ole.rb +0 -4
  55. data/test/test_storage_lite.rb +0 -9
  56. data/test/test_workbook.rb +0 -4
  57. data/test/test_worksheet.rb +3 -7
  58. data/writeexcel.gemspec +12 -2
  59. metadata +12 -2
@@ -0,0 +1,25 @@
1
+ class Workbook < BIFFWriter
2
+ require 'writeexcel/properties'
3
+ require 'writeexcel/helper'
4
+
5
+ class Worksheets < Array
6
+ attr_accessor :activesheet
7
+ attr_writer :firstsheet
8
+
9
+ def initialize
10
+ @activesheet = nil
11
+ end
12
+
13
+ def activesheet_index
14
+ index(@activesheet)
15
+ end
16
+
17
+ def firstsheet_index
18
+ index(@firstsheet) || 0
19
+ end
20
+
21
+ def selected_count
22
+ self.select { |sheet| sheet.selected? }.size
23
+ end
24
+ end
25
+ end
@@ -1,6 +1,21 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  class WriteFile
4
+ def initialize
5
+ @data = ''
6
+ @datasize = 0
7
+ @limit = 8224
8
+
9
+ # Open a tmp file to store the majority of the Worksheet data. If this fails,
10
+ # for example due to write permissions, store the data in memory. This can be
11
+ # slow for large files.
12
+ @filehandle = Tempfile.new('writeexcel')
13
+ @filehandle.binmode
14
+
15
+ # failed. store temporary data in memory.
16
+ @using_tmpfile = @filehandle ? true : false
17
+ end
18
+
4
19
  ###############################################################################
5
20
  #
6
21
  # _prepend($data)
@@ -8,13 +23,8 @@ class WriteFile
8
23
  # General storage function
9
24
  #
10
25
  def prepend(*args)
11
- data =
12
- ruby_18 { args.join } ||
13
- ruby_19 { args.collect{ |arg| arg.dup.force_encoding('ASCII-8BIT') }.join }
14
- data = add_continue(data) if data.bytesize > @limit
15
-
16
- @datasize += data.bytesize
17
- @data = data + @data
26
+ data = join_data(args)
27
+ @data = data + @data
18
28
 
19
29
  data
20
30
  end
@@ -26,18 +36,27 @@ def prepend(*args)
26
36
  # General storage function
27
37
  #
28
38
  def append(*args)
39
+ data = join_data(args)
40
+
41
+ if @using_tmpfile
42
+ @filehandle.write(data)
43
+ else
44
+ @data += data
45
+ end
46
+
47
+ data
48
+ end
49
+
50
+ private
51
+
52
+ def join_data(args)
29
53
  data =
30
54
  ruby_18 { args.join } ||
31
- ruby_19 { args.collect{ |arg| arg.dup.force_encoding('ASCII-8BIT') }.join }
55
+ ruby_19 { args.compact.collect{ |arg| arg.dup.force_encoding('ASCII-8BIT') }.join }
32
56
  # Add CONTINUE records if necessary
33
57
  data = add_continue(data) if data.bytesize > @limit
34
- if @using_tmpfile
35
- @filehandle.write data
36
- @datasize += data.bytesize
37
- else
38
- @datasize += data.bytesize
39
- @data = @data + data
40
- end
58
+
59
+ @datasize += data.bytesize
41
60
 
42
61
  data
43
62
  end
@@ -14,10 +14,6 @@ def setup
14
14
  @worksheet.set_column('G:G', nil, @merged_format)
15
15
  end
16
16
 
17
- def teardown
18
- @workbook.close
19
- end
20
-
21
17
  def test_some
22
18
  # Test 1 Normal usage.
23
19
  assert_nothing_raised { @worksheet.write('A1', 'Test', @non_merged_format) }
@@ -24,10 +24,6 @@ def setup
24
24
  @smiley = [0x263a].pack('n')
25
25
  end
26
26
 
27
- def teardown
28
- @workbook.close
29
- end
30
-
31
27
  def test_no_worksheet_cell_data
32
28
  data = @worksheet.__send__("store_dimensions")
33
29
 
@@ -172,8 +172,4 @@ def test_1
172
172
  assert_equal(@tests[i][1], rows[i], @tests[i][0])
173
173
  end
174
174
  end
175
-
176
- def teardown
177
- end
178
-
179
175
  end
@@ -6,9 +6,6 @@
6
6
  # all test is commented out because Workbook#calculate_extsst_size was set to
7
7
  # private method. Before that, all test passed.
8
8
  #
9
- #
10
- #
11
- #
12
9
  # Check that we calculate the correct bucket size and number for the EXTSST
13
10
  # record. The data is taken from actual Excel files.
14
11
  #
@@ -24,7 +21,8 @@
24
21
  class TC_extsst < Test::Unit::TestCase
25
22
 
26
23
  def setup
27
- @tests = [ # Unique Number of Bucket
24
+ @tests = [
25
+ # Unique Number of Bucket
28
26
  # strings buckets size
29
27
  [0, 0, 8],
30
28
  [1, 1, 8],
@@ -65,8 +63,7 @@ def test_to_tests
65
63
 
66
64
  str_unique = test[0]
67
65
 
68
- workbook.str_unique = str_unique
69
- workbook.__send__("calculate_extsst_size")
66
+ workbook.__send__("calculate_extsst_size", str_unique)
70
67
 
71
68
  assert_equal(test[1], workbook.extsst_buckets,
72
69
  " \tBucket number for #{str_unique} strings")
@@ -22,10 +22,6 @@ def setup
22
22
  @fit_delta = 0.5/(24*60*60*1000)
23
23
  end
24
24
 
25
- def teardown
26
- @workbook.close
27
- end
28
-
29
25
  def fit_cmp(a, b)
30
26
  return (a-b).abs < @fit_delta
31
27
  end
@@ -1,4 +1,3 @@
1
-
2
1
  # -*- coding: utf-8 -*-
3
2
  ###############################################################################
4
3
  #
@@ -15,30 +14,52 @@
15
14
  require 'helper'
16
15
  require 'stringio'
17
16
 
17
+ class ForTest
18
+ include ConvertDateTime
19
+ end
20
+
18
21
  class TC_data_only < Test::Unit::TestCase
19
22
 
20
- def test_the_dates_generated_by_excel
21
- lines = data_generated_excel.split(/\n/)
22
- while !lines.empty?
23
- line = lines.shift.sub(/^\s*/,'')
23
+ def setup
24
+ @obj = ForTest.new
25
+ end
26
+
27
+ def test_the_dates_generated_by_excel_1900
28
+ data_generated_excel_1900.each_line do |line|
29
+ line = line.sub(/^\s*/,'')
24
30
  braak if line =~ /^\s*# stop/ # For debugging
25
31
 
26
32
  next unless line =~ /\S/ # Ignore blank lines
27
33
  next if line =~ /^\s*#/ # Ignore comments
28
34
 
29
- count, date, result = line.split(/\s+/)
30
- count = count.to_i
31
- workbook = WriteExcel.new(StringIO.new)
32
- workbook.set_1904 if (201 <= count && count <= 400) || (411 <= count)
33
- worksheet = workbook.add_worksheet
34
- number = worksheet.__send__("convert_date_time", date)
35
- number = -1 if number.nil?
35
+ result, number, date = analyze(line)
36
36
  assert_equal(result.to_i, number,
37
37
  "Testing convert_date_time: #{date} #{result}")
38
38
  end
39
39
  end
40
40
 
41
- def data_generated_excel
41
+ def test_the_dates_generated_by_excel_1904
42
+ data_generated_excel_1904.each_line do |line|
43
+ line = line.sub(/^\s*/,'')
44
+ braak if line =~ /^\s*# stop/ # For debugging
45
+
46
+ next unless line =~ /\S/ # Ignore blank lines
47
+ next if line =~ /^\s*#/ # Ignore comments
48
+ result, number, date = analyze(line, true)
49
+ assert_equal(result.to_i, number,
50
+ "Testing convert_date_time: #{date} #{result}")
51
+ end
52
+ end
53
+
54
+ def analyze(line, date_1904 = false)
55
+ count, date, result = line.split(/\s+/)
56
+ count = count.to_i
57
+ number = @obj.convert_date_time(date, date_1904)
58
+ number = -1 if number.nil?
59
+ [result, number, date]
60
+ end
61
+
62
+ def data_generated_excel_1904
42
63
 
43
64
  return <<-__DATA_END__
44
65
 
@@ -46,210 +67,6 @@ def data_generated_excel
46
67
  # The following data was generated by Excel.
47
68
  #
48
69
 
49
- #
50
- # Excel 1900 date system
51
- #
52
- 1 1899-12-31T 0
53
- 2 1900-01-00T 0
54
- 3 1900-01-01T 1
55
- 4 1900-02-27T 58
56
- 5 1900-02-28T 59
57
- 6 1900-02-29T 60
58
- 7 1900-03-01T 61
59
- 8 1900-03-02T 62
60
- 9 1900-03-11T 71
61
- 10 1900-04-08T 99
62
- 11 1900-09-12T 256
63
- 12 1901-05-03T 489
64
- 13 1901-10-13T 652
65
- 14 1902-02-15T 777
66
- 15 1902-06-06T 888
67
- 16 1902-09-25T 999
68
- 17 1902-09-27T 1001
69
- 18 1903-04-26T 1212
70
- 19 1903-08-05T 1313
71
- 20 1903-12-31T 1461
72
- 21 1904-01-01T 1462
73
- 22 1904-02-28T 1520
74
- 23 1904-02-29T 1521
75
- 24 1904-03-01T 1522
76
- 25 1907-02-27T 2615
77
- 26 1907-02-28T 2616
78
- 27 1907-03-01T 2617
79
- 28 1907-03-02T 2618
80
- 29 1907-03-03T 2619
81
- 30 1907-03-04T 2620
82
- 31 1907-03-05T 2621
83
- 32 1907-03-06T 2622
84
- 33 1999-01-01T 36161
85
- 34 1999-01-31T 36191
86
- 35 1999-02-01T 36192
87
- 36 1999-02-28T 36219
88
- 37 1999-03-01T 36220
89
- 38 1999-03-31T 36250
90
- 39 1999-04-01T 36251
91
- 40 1999-04-30T 36280
92
- 41 1999-05-01T 36281
93
- 42 1999-05-31T 36311
94
- 43 1999-06-01T 36312
95
- 44 1999-06-30T 36341
96
- 45 1999-07-01T 36342
97
- 46 1999-07-31T 36372
98
- 47 1999-08-01T 36373
99
- 48 1999-08-31T 36403
100
- 49 1999-09-01T 36404
101
- 50 1999-09-30T 36433
102
- 51 1999-10-01T 36434
103
- 52 1999-10-31T 36464
104
- 53 1999-11-01T 36465
105
- 54 1999-11-30T 36494
106
- 55 1999-12-01T 36495
107
- 56 1999-12-31T 36525
108
- 57 2000-01-01T 36526
109
- 58 2000-01-31T 36556
110
- 59 2000-02-01T 36557
111
- 60 2000-02-29T 36585
112
- 61 2000-03-01T 36586
113
- 62 2000-03-31T 36616
114
- 63 2000-04-01T 36617
115
- 64 2000-04-30T 36646
116
- 65 2000-05-01T 36647
117
- 66 2000-05-31T 36677
118
- 67 2000-06-01T 36678
119
- 68 2000-06-30T 36707
120
- 69 2000-07-01T 36708
121
- 70 2000-07-31T 36738
122
- 71 2000-08-01T 36739
123
- 72 2000-08-31T 36769
124
- 73 2000-09-01T 36770
125
- 74 2000-09-30T 36799
126
- 75 2000-10-01T 36800
127
- 76 2000-10-31T 36830
128
- 77 2000-11-01T 36831
129
- 78 2000-11-30T 36860
130
- 79 2000-12-01T 36861
131
- 80 2000-12-31T 36891
132
- 81 2001-01-01T 36892
133
- 82 2001-01-31T 36922
134
- 83 2001-02-01T 36923
135
- 84 2001-02-28T 36950
136
- 85 2001-03-01T 36951
137
- 86 2001-03-31T 36981
138
- 87 2001-04-01T 36982
139
- 88 2001-04-30T 37011
140
- 89 2001-05-01T 37012
141
- 90 2001-05-31T 37042
142
- 91 2001-06-01T 37043
143
- 92 2001-06-30T 37072
144
- 93 2001-07-01T 37073
145
- 94 2001-07-31T 37103
146
- 95 2001-08-01T 37104
147
- 96 2001-08-31T 37134
148
- 97 2001-09-01T 37135
149
- 98 2001-09-30T 37164
150
- 99 2001-10-01T 37165
151
- 100 2001-10-31T 37195
152
- 101 2001-11-01T 37196
153
- 102 2001-11-30T 37225
154
- 103 2001-12-01T 37226
155
- 104 2001-12-31T 37256
156
- 105 2400-01-01T 182623
157
- 106 2400-01-31T 182653
158
- 107 2400-02-01T 182654
159
- 108 2400-02-29T 182682
160
- 109 2400-03-01T 182683
161
- 110 2400-03-31T 182713
162
- 111 2400-04-01T 182714
163
- 112 2400-04-30T 182743
164
- 113 2400-05-01T 182744
165
- 114 2400-05-31T 182774
166
- 115 2400-06-01T 182775
167
- 116 2400-06-30T 182804
168
- 117 2400-07-01T 182805
169
- 118 2400-07-31T 182835
170
- 119 2400-08-01T 182836
171
- 120 2400-08-31T 182866
172
- 121 2400-09-01T 182867
173
- 122 2400-09-30T 182896
174
- 123 2400-10-01T 182897
175
- 124 2400-10-31T 182927
176
- 125 2400-11-01T 182928
177
- 126 2400-11-30T 182957
178
- 127 2400-12-01T 182958
179
- 128 2400-12-31T 182988
180
- 129 4000-01-01T 767011
181
- 130 4000-01-31T 767041
182
- 131 4000-02-01T 767042
183
- 132 4000-02-29T 767070
184
- 133 4000-03-01T 767071
185
- 134 4000-03-31T 767101
186
- 135 4000-04-01T 767102
187
- 136 4000-04-30T 767131
188
- 137 4000-05-01T 767132
189
- 138 4000-05-31T 767162
190
- 139 4000-06-01T 767163
191
- 140 4000-06-30T 767192
192
- 141 4000-07-01T 767193
193
- 142 4000-07-31T 767223
194
- 143 4000-08-01T 767224
195
- 144 4000-08-31T 767254
196
- 145 4000-09-01T 767255
197
- 146 4000-09-30T 767284
198
- 147 4000-10-01T 767285
199
- 148 4000-10-31T 767315
200
- 149 4000-11-01T 767316
201
- 150 4000-11-30T 767345
202
- 151 4000-12-01T 767346
203
- 152 4000-12-31T 767376
204
- 153 4321-01-01T 884254
205
- 154 4321-01-31T 884284
206
- 155 4321-02-01T 884285
207
- 156 4321-02-28T 884312
208
- 157 4321-03-01T 884313
209
- 158 4321-03-31T 884343
210
- 159 4321-04-01T 884344
211
- 160 4321-04-30T 884373
212
- 161 4321-05-01T 884374
213
- 162 4321-05-31T 884404
214
- 163 4321-06-01T 884405
215
- 164 4321-06-30T 884434
216
- 165 4321-07-01T 884435
217
- 166 4321-07-31T 884465
218
- 167 4321-08-01T 884466
219
- 168 4321-08-31T 884496
220
- 169 4321-09-01T 884497
221
- 170 4321-09-30T 884526
222
- 171 4321-10-01T 884527
223
- 172 4321-10-31T 884557
224
- 173 4321-11-01T 884558
225
- 174 4321-11-30T 884587
226
- 175 4321-12-01T 884588
227
- 176 4321-12-31T 884618
228
- 177 9999-01-01T 2958101
229
- 178 9999-01-31T 2958131
230
- 179 9999-02-01T 2958132
231
- 180 9999-02-28T 2958159
232
- 181 9999-03-01T 2958160
233
- 182 9999-03-31T 2958190
234
- 183 9999-04-01T 2958191
235
- 184 9999-04-30T 2958220
236
- 185 9999-05-01T 2958221
237
- 186 9999-05-31T 2958251
238
- 187 9999-06-01T 2958252
239
- 188 9999-06-30T 2958281
240
- 189 9999-07-01T 2958282
241
- 190 9999-07-31T 2958312
242
- 191 9999-08-01T 2958313
243
- 192 9999-08-31T 2958343
244
- 193 9999-09-01T 2958344
245
- 194 9999-09-30T 2958373
246
- 195 9999-10-01T 2958374
247
- 196 9999-10-31T 2958404
248
- 197 9999-11-01T 2958405
249
- 198 9999-11-30T 2958434
250
- 199 9999-12-01T 2958435
251
- 200 9999-12-31T 2958465
252
-
253
70
  #
254
71
  # Excel 1904 date system
255
72
  #
@@ -459,9 +276,237 @@ def data_generated_excel
459
276
  # The following dates are invalid.
460
277
  #
461
278
 
279
+ 411 1899-12-31T -1 # Below year range.
280
+ 412 1900-01-01T -1 # Below year range.
281
+ 413 1903-12-31T -1 # Below year range.
282
+ 414 2001-02-29T -1 # False leap-day.
283
+ 415 2000-00-00T -1 # No month or day.
284
+ 416 2000-01-00T -1 # No day.
285
+ 417 2000-00-01T -1 # No month.
286
+ 418 2000-13-01T -1 # Month out of range.
287
+ 419 2000-12-32T -1 # Day out of range.
288
+ 420 10000-01-01T -1 # Year out of range.
289
+
290
+ __DATA_END__
291
+
292
+ end
293
+
294
+ def data_generated_excel_1900
295
+
296
+ return <<-__DATA_END__
297
+
298
+ #
299
+ # The following data was generated by Excel.
300
+ #
301
+
462
302
  #
463
303
  # Excel 1900 date system
464
304
  #
305
+ 1 1899-12-31T 0
306
+ 2 1900-01-00T 0
307
+ 3 1900-01-01T 1
308
+ 4 1900-02-27T 58
309
+ 5 1900-02-28T 59
310
+ 6 1900-02-29T 60
311
+ 7 1900-03-01T 61
312
+ 8 1900-03-02T 62
313
+ 9 1900-03-11T 71
314
+ 10 1900-04-08T 99
315
+ 11 1900-09-12T 256
316
+ 12 1901-05-03T 489
317
+ 13 1901-10-13T 652
318
+ 14 1902-02-15T 777
319
+ 15 1902-06-06T 888
320
+ 16 1902-09-25T 999
321
+ 17 1902-09-27T 1001
322
+ 18 1903-04-26T 1212
323
+ 19 1903-08-05T 1313
324
+ 20 1903-12-31T 1461
325
+ 21 1904-01-01T 1462
326
+ 22 1904-02-28T 1520
327
+ 23 1904-02-29T 1521
328
+ 24 1904-03-01T 1522
329
+ 25 1907-02-27T 2615
330
+ 26 1907-02-28T 2616
331
+ 27 1907-03-01T 2617
332
+ 28 1907-03-02T 2618
333
+ 29 1907-03-03T 2619
334
+ 30 1907-03-04T 2620
335
+ 31 1907-03-05T 2621
336
+ 32 1907-03-06T 2622
337
+ 33 1999-01-01T 36161
338
+ 34 1999-01-31T 36191
339
+ 35 1999-02-01T 36192
340
+ 36 1999-02-28T 36219
341
+ 37 1999-03-01T 36220
342
+ 38 1999-03-31T 36250
343
+ 39 1999-04-01T 36251
344
+ 40 1999-04-30T 36280
345
+ 41 1999-05-01T 36281
346
+ 42 1999-05-31T 36311
347
+ 43 1999-06-01T 36312
348
+ 44 1999-06-30T 36341
349
+ 45 1999-07-01T 36342
350
+ 46 1999-07-31T 36372
351
+ 47 1999-08-01T 36373
352
+ 48 1999-08-31T 36403
353
+ 49 1999-09-01T 36404
354
+ 50 1999-09-30T 36433
355
+ 51 1999-10-01T 36434
356
+ 52 1999-10-31T 36464
357
+ 53 1999-11-01T 36465
358
+ 54 1999-11-30T 36494
359
+ 55 1999-12-01T 36495
360
+ 56 1999-12-31T 36525
361
+ 57 2000-01-01T 36526
362
+ 58 2000-01-31T 36556
363
+ 59 2000-02-01T 36557
364
+ 60 2000-02-29T 36585
365
+ 61 2000-03-01T 36586
366
+ 62 2000-03-31T 36616
367
+ 63 2000-04-01T 36617
368
+ 64 2000-04-30T 36646
369
+ 65 2000-05-01T 36647
370
+ 66 2000-05-31T 36677
371
+ 67 2000-06-01T 36678
372
+ 68 2000-06-30T 36707
373
+ 69 2000-07-01T 36708
374
+ 70 2000-07-31T 36738
375
+ 71 2000-08-01T 36739
376
+ 72 2000-08-31T 36769
377
+ 73 2000-09-01T 36770
378
+ 74 2000-09-30T 36799
379
+ 75 2000-10-01T 36800
380
+ 76 2000-10-31T 36830
381
+ 77 2000-11-01T 36831
382
+ 78 2000-11-30T 36860
383
+ 79 2000-12-01T 36861
384
+ 80 2000-12-31T 36891
385
+ 81 2001-01-01T 36892
386
+ 82 2001-01-31T 36922
387
+ 83 2001-02-01T 36923
388
+ 84 2001-02-28T 36950
389
+ 85 2001-03-01T 36951
390
+ 86 2001-03-31T 36981
391
+ 87 2001-04-01T 36982
392
+ 88 2001-04-30T 37011
393
+ 89 2001-05-01T 37012
394
+ 90 2001-05-31T 37042
395
+ 91 2001-06-01T 37043
396
+ 92 2001-06-30T 37072
397
+ 93 2001-07-01T 37073
398
+ 94 2001-07-31T 37103
399
+ 95 2001-08-01T 37104
400
+ 96 2001-08-31T 37134
401
+ 97 2001-09-01T 37135
402
+ 98 2001-09-30T 37164
403
+ 99 2001-10-01T 37165
404
+ 100 2001-10-31T 37195
405
+ 101 2001-11-01T 37196
406
+ 102 2001-11-30T 37225
407
+ 103 2001-12-01T 37226
408
+ 104 2001-12-31T 37256
409
+ 105 2400-01-01T 182623
410
+ 106 2400-01-31T 182653
411
+ 107 2400-02-01T 182654
412
+ 108 2400-02-29T 182682
413
+ 109 2400-03-01T 182683
414
+ 110 2400-03-31T 182713
415
+ 111 2400-04-01T 182714
416
+ 112 2400-04-30T 182743
417
+ 113 2400-05-01T 182744
418
+ 114 2400-05-31T 182774
419
+ 115 2400-06-01T 182775
420
+ 116 2400-06-30T 182804
421
+ 117 2400-07-01T 182805
422
+ 118 2400-07-31T 182835
423
+ 119 2400-08-01T 182836
424
+ 120 2400-08-31T 182866
425
+ 121 2400-09-01T 182867
426
+ 122 2400-09-30T 182896
427
+ 123 2400-10-01T 182897
428
+ 124 2400-10-31T 182927
429
+ 125 2400-11-01T 182928
430
+ 126 2400-11-30T 182957
431
+ 127 2400-12-01T 182958
432
+ 128 2400-12-31T 182988
433
+ 129 4000-01-01T 767011
434
+ 130 4000-01-31T 767041
435
+ 131 4000-02-01T 767042
436
+ 132 4000-02-29T 767070
437
+ 133 4000-03-01T 767071
438
+ 134 4000-03-31T 767101
439
+ 135 4000-04-01T 767102
440
+ 136 4000-04-30T 767131
441
+ 137 4000-05-01T 767132
442
+ 138 4000-05-31T 767162
443
+ 139 4000-06-01T 767163
444
+ 140 4000-06-30T 767192
445
+ 141 4000-07-01T 767193
446
+ 142 4000-07-31T 767223
447
+ 143 4000-08-01T 767224
448
+ 144 4000-08-31T 767254
449
+ 145 4000-09-01T 767255
450
+ 146 4000-09-30T 767284
451
+ 147 4000-10-01T 767285
452
+ 148 4000-10-31T 767315
453
+ 149 4000-11-01T 767316
454
+ 150 4000-11-30T 767345
455
+ 151 4000-12-01T 767346
456
+ 152 4000-12-31T 767376
457
+ 153 4321-01-01T 884254
458
+ 154 4321-01-31T 884284
459
+ 155 4321-02-01T 884285
460
+ 156 4321-02-28T 884312
461
+ 157 4321-03-01T 884313
462
+ 158 4321-03-31T 884343
463
+ 159 4321-04-01T 884344
464
+ 160 4321-04-30T 884373
465
+ 161 4321-05-01T 884374
466
+ 162 4321-05-31T 884404
467
+ 163 4321-06-01T 884405
468
+ 164 4321-06-30T 884434
469
+ 165 4321-07-01T 884435
470
+ 166 4321-07-31T 884465
471
+ 167 4321-08-01T 884466
472
+ 168 4321-08-31T 884496
473
+ 169 4321-09-01T 884497
474
+ 170 4321-09-30T 884526
475
+ 171 4321-10-01T 884527
476
+ 172 4321-10-31T 884557
477
+ 173 4321-11-01T 884558
478
+ 174 4321-11-30T 884587
479
+ 175 4321-12-01T 884588
480
+ 176 4321-12-31T 884618
481
+ 177 9999-01-01T 2958101
482
+ 178 9999-01-31T 2958131
483
+ 179 9999-02-01T 2958132
484
+ 180 9999-02-28T 2958159
485
+ 181 9999-03-01T 2958160
486
+ 182 9999-03-31T 2958190
487
+ 183 9999-04-01T 2958191
488
+ 184 9999-04-30T 2958220
489
+ 185 9999-05-01T 2958221
490
+ 186 9999-05-31T 2958251
491
+ 187 9999-06-01T 2958252
492
+ 188 9999-06-30T 2958281
493
+ 189 9999-07-01T 2958282
494
+ 190 9999-07-31T 2958312
495
+ 191 9999-08-01T 2958313
496
+ 192 9999-08-31T 2958343
497
+ 193 9999-09-01T 2958344
498
+ 194 9999-09-30T 2958373
499
+ 195 9999-10-01T 2958374
500
+ 196 9999-10-31T 2958404
501
+ 197 9999-11-01T 2958405
502
+ 198 9999-11-30T 2958434
503
+ 199 9999-12-01T 2958435
504
+ 200 9999-12-31T 2958465
505
+
506
+ #
507
+ # The following dates are invalid.
508
+ #
509
+
465
510
  401 0000-12-30T -1 # Below year range.
466
511
  402 1000-12-30T -1 # Below year range.
467
512
  403 1899-12-30T -1 # Below year range.
@@ -473,20 +518,6 @@ def data_generated_excel
473
518
  409 2000-12-32T -1 # Day out of range.
474
519
  410 10000-01-01T -1 # Year out of range.
475
520
 
476
- #
477
- # Excel 1904 date system
478
- #
479
- 411 1899-12-31T -1 # Below year range.
480
- 412 1900-01-01T -1 # Below year range.
481
- 413 1903-12-31T -1 # Below year range.
482
- 414 2001-02-29T -1 # False leap-day.
483
- 415 2000-00-00T -1 # No month or day.
484
- 416 2000-01-00T -1 # No day.
485
- 417 2000-00-01T -1 # No month.
486
- 418 2000-13-01T -1 # Month out of range.
487
- 419 2000-12-32T -1 # Day out of range.
488
- 420 10000-01-01T -1 # Year out of range.
489
-
490
521
  __DATA_END__
491
522
 
492
523
  end