writeexcel 0.6.17 → 0.6.18
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.
- data/README.rdoc +4 -1
- data/lib/writeexcel/version.rb +1 -1
- data/lib/writeexcel/worksheet.rb +3 -9
- data/test/perl_output/compatibility_mode_write_number.xls +0 -0
- data/test/perl_output/{compatibility_mode.xls → compatibility_mode_write_string.xls} +0 -0
- data/test/test_example_match.rb +15 -2
- metadata +6 -4
data/README.rdoc
CHANGED
@@ -90,8 +90,11 @@ You must save source file in UTF8 and run ruby with -Ku option or set $KCODE='u'
|
|
90
90
|
when use urf8 string data.
|
91
91
|
|
92
92
|
== Recent Changes
|
93
|
+
v0.6.18
|
94
|
+
* Bug fix in compatibility_mode (Worksheet#write_number).
|
95
|
+
|
93
96
|
v0.6.17
|
94
|
-
* Bug fix in compatibility_mode.
|
97
|
+
* Bug fix in compatibility_mode (Worksheet#write_string).
|
95
98
|
|
96
99
|
v0.6.16
|
97
100
|
* typo fix
|
data/lib/writeexcel/version.rb
CHANGED
data/lib/writeexcel/worksheet.rb
CHANGED
@@ -968,13 +968,13 @@ class Worksheet < BIFFWriter
|
|
968
968
|
end
|
969
969
|
end
|
970
970
|
|
971
|
-
#
|
971
|
+
#
|
972
972
|
# :call-seq:
|
973
973
|
# merge_range_with_date_time(first_row, first_col, last_row, last_col, token, format)
|
974
974
|
#
|
975
975
|
# Write to meged cells, a datetime string in ISO8601 "yyyy-mm-ddThh:mm:ss.ss" format as a
|
976
976
|
# number representing an Excel date. format is optional.
|
977
|
-
#
|
977
|
+
#
|
978
978
|
def merge_range_with_date_time(*args)
|
979
979
|
# Check for a cell reference in A1 notation and substitute row and column
|
980
980
|
args = row_col_notation(args)
|
@@ -2297,13 +2297,7 @@ class Worksheet < BIFFWriter
|
|
2297
2297
|
xl_double.reverse! if @byte_order
|
2298
2298
|
|
2299
2299
|
# Store the data or write immediately depending on the compatibility mode.
|
2300
|
-
|
2301
|
-
tmp = []
|
2302
|
-
tmp[col] = header + data + xl_double
|
2303
|
-
@table[row] = tmp
|
2304
|
-
else
|
2305
|
-
append(header, data, xl_double)
|
2306
|
-
end
|
2300
|
+
store_with_compatibility(row, col, header + data + xl_double)
|
2307
2301
|
|
2308
2302
|
0
|
2309
2303
|
end
|
Binary file
|
File without changes
|
data/test/test_example_match.rb
CHANGED
@@ -3287,7 +3287,7 @@ workbook.close
|
|
3287
3287
|
compare_file("#{PERL_OUTDIR}/more_than_10_sheets_reference.xls", @file)
|
3288
3288
|
end
|
3289
3289
|
|
3290
|
-
def
|
3290
|
+
def test_compatibility_mode_write_string
|
3291
3291
|
workbook = WriteExcel.new(@file)
|
3292
3292
|
workbook.compatibility_mode
|
3293
3293
|
|
@@ -3297,6 +3297,19 @@ workbook.close
|
|
3297
3297
|
workbook.close
|
3298
3298
|
|
3299
3299
|
# do assertion
|
3300
|
-
compare_file("#{PERL_OUTDIR}/
|
3300
|
+
compare_file("#{PERL_OUTDIR}/compatibility_mode_write_string.xls", @file)
|
3301
|
+
end
|
3302
|
+
|
3303
|
+
def test_compatibility_mode_write_number
|
3304
|
+
workbook = WriteExcel.new(@file)
|
3305
|
+
workbook.compatibility_mode
|
3306
|
+
|
3307
|
+
worksheet = workbook.add_worksheet('DataSheet')
|
3308
|
+
worksheet.write_number(0,0,100)
|
3309
|
+
worksheet.write_number(0,1,200)
|
3310
|
+
workbook.close
|
3311
|
+
|
3312
|
+
# do assertion
|
3313
|
+
compare_file("#{PERL_OUTDIR}/compatibility_mode_write_number.xls", @file)
|
3301
3314
|
end
|
3302
3315
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: writeexcel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.18
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Multiple worksheets can be added to a workbook and formatting can be
|
15
15
|
applied to cells. Text, numbers, formulas, hyperlinks and images can be written
|
@@ -169,7 +169,8 @@ files:
|
|
169
169
|
- test/perl_output/comments0.xls
|
170
170
|
- test/perl_output/comments1.xls
|
171
171
|
- test/perl_output/comments2.xls
|
172
|
-
- test/perl_output/
|
172
|
+
- test/perl_output/compatibility_mode_write_number.xls
|
173
|
+
- test/perl_output/compatibility_mode_write_string.xls
|
173
174
|
- test/perl_output/data_validate.xls
|
174
175
|
- test/perl_output/date_time.xls
|
175
176
|
- test/perl_output/defined_name.xls
|
@@ -320,7 +321,8 @@ test_files:
|
|
320
321
|
- test/perl_output/comments0.xls
|
321
322
|
- test/perl_output/comments1.xls
|
322
323
|
- test/perl_output/comments2.xls
|
323
|
-
- test/perl_output/
|
324
|
+
- test/perl_output/compatibility_mode_write_number.xls
|
325
|
+
- test/perl_output/compatibility_mode_write_string.xls
|
324
326
|
- test/perl_output/data_validate.xls
|
325
327
|
- test/perl_output/date_time.xls
|
326
328
|
- test/perl_output/defined_name.xls
|