writeexcel 0.6.13 → 0.6.14
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 +3 -0
- data/VERSION +1 -1
- data/lib/writeexcel/workbook.rb +3 -1
- data/lib/writeexcel/worksheet.rb +1 -1
- data/test/perl_output/more_than_10_sheets_reference.xls +0 -0
- data/test/test_example_match.rb +43 -0
- data/writeexcel.gemspec +3 -2
- metadata +22 -38
data/README.rdoc
CHANGED
@@ -76,6 +76,9 @@ You must save source file in UTF8 and run ruby with -Ku option or set $KCODE='u'
|
|
76
76
|
when use urf8 string data.
|
77
77
|
|
78
78
|
== Recent Changes
|
79
|
+
v0.6.14
|
80
|
+
* Buf fix Issues 20. If more than 10 sheets, sheet reference mix up
|
81
|
+
|
79
82
|
v0.6.13
|
80
83
|
* Bug fix issue 19. Workbook#store_num_format, format written in utf8 raise exception.
|
81
84
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.14
|
data/lib/writeexcel/workbook.rb
CHANGED
@@ -1764,7 +1764,9 @@ def store_externsheet # :nodoc:
|
|
1764
1764
|
record = 0x0017 # Record identifier
|
1765
1765
|
|
1766
1766
|
# Get the external refs
|
1767
|
-
|
1767
|
+
|
1768
|
+
ext = @ext_refs.keys.sort {|a, b| a.split(':')[0].to_i <=> b.split(':')[0].to_i}
|
1769
|
+
|
1768
1770
|
|
1769
1771
|
# Change the external refs from stringified "1:1" to [1, 1]
|
1770
1772
|
ext.map! {|e| e.split(/:/).map! {|v| v.to_i} }
|
data/lib/writeexcel/worksheet.rb
CHANGED
@@ -4906,7 +4906,7 @@ def xf_record_index(row, col, xf=nil) #:nodoc:
|
|
4906
4906
|
# Ex: ("A4", "Hello") is converted to (3, 0, "Hello").
|
4907
4907
|
#
|
4908
4908
|
def substitute_cellref(cell, *args) #:nodoc:
|
4909
|
-
return [*args] if cell.respond_to?(:coerce) # Numeric
|
4909
|
+
return [cell, *args] if cell.respond_to?(:coerce) # Numeric
|
4910
4910
|
|
4911
4911
|
cell.upcase!
|
4912
4912
|
|
Binary file
|
data/test/test_example_match.rb
CHANGED
@@ -3243,4 +3243,47 @@ def test_store_formula
|
|
3243
3243
|
# do assertion
|
3244
3244
|
compare_file("#{PERL_OUTDIR}/store_formula.xls", @file)
|
3245
3245
|
end
|
3246
|
+
|
3247
|
+
def test_more_than_10_sheets_reference
|
3248
|
+
workbook = WriteExcel.new(@file)
|
3249
|
+
|
3250
|
+
worksheet1 = workbook.add_worksheet
|
3251
|
+
worksheet2 = workbook.add_worksheet
|
3252
|
+
worksheet3 = workbook.add_worksheet
|
3253
|
+
worksheet4 = workbook.add_worksheet
|
3254
|
+
worksheet5 = workbook.add_worksheet
|
3255
|
+
worksheet6 = workbook.add_worksheet
|
3256
|
+
worksheet7 = workbook.add_worksheet
|
3257
|
+
worksheet8 = workbook.add_worksheet
|
3258
|
+
worksheet9 = workbook.add_worksheet
|
3259
|
+
worksheet10 = workbook.add_worksheet
|
3260
|
+
worksheet11 = workbook.add_worksheet
|
3261
|
+
|
3262
|
+
worksheet2.write(0, 0, 'worksheet2')
|
3263
|
+
worksheet3.write(0, 0, 'worksheet3')
|
3264
|
+
worksheet4.write(0, 0, 'worksheet4')
|
3265
|
+
worksheet5.write(0, 0, 'worksheet5')
|
3266
|
+
worksheet6.write(0, 0, 'worksheet6')
|
3267
|
+
worksheet7.write(0, 0, 'worksheet7')
|
3268
|
+
worksheet8.write(0, 0, 'worksheet8')
|
3269
|
+
worksheet9.write(0, 0, 'worksheet9')
|
3270
|
+
worksheet10.write(0, 0, 'worksheet10')
|
3271
|
+
worksheet11.write(0, 0, 'worksheet11')
|
3272
|
+
|
3273
|
+
worksheet1.write(0, 2, '=Sheet2!A1')
|
3274
|
+
worksheet1.write(0, 3, '=Sheet3!A1')
|
3275
|
+
worksheet1.write(0, 4, '=Sheet4!A1')
|
3276
|
+
worksheet1.write(0, 5, '=Sheet5!A1')
|
3277
|
+
worksheet1.write(0, 6, '=Sheet6!A1')
|
3278
|
+
worksheet1.write(0, 7, '=Sheet7!A1')
|
3279
|
+
worksheet1.write(0, 8, '=Sheet8!A1')
|
3280
|
+
worksheet1.write(0, 9, '=Sheet9!A1')
|
3281
|
+
worksheet1.write(0, 10, '=Sheet10!A1')
|
3282
|
+
worksheet1.write(0, 11, '=Sheet11!A1')
|
3283
|
+
|
3284
|
+
workbook.close
|
3285
|
+
|
3286
|
+
# do assertion
|
3287
|
+
compare_file("#{PERL_OUTDIR}/more_than_10_sheets_reference.xls", @file)
|
3288
|
+
end
|
3246
3289
|
end
|
data/writeexcel.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "writeexcel"
|
8
|
-
s.version = "0.6.
|
8
|
+
s.version = "0.6.14"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Hideo NAKAMURA"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-07-12"
|
13
13
|
s.description = "Multiple worksheets can be added to a workbook and formatting can be applied to cells. Text, numbers, formulas, hyperlinks and images can be written to the cells."
|
14
14
|
s.email = "cxn03651@msj.biglobe.ne.jp"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -189,6 +189,7 @@ Gem::Specification.new do |s|
|
|
189
189
|
"test/perl_output/merge4.xls",
|
190
190
|
"test/perl_output/merge5.xls",
|
191
191
|
"test/perl_output/merge6.xls",
|
192
|
+
"test/perl_output/more_than_10_sheets_reference.xls",
|
192
193
|
"test/perl_output/ole_write_header",
|
193
194
|
"test/perl_output/outline.xls",
|
194
195
|
"test/perl_output/outline_collapsed.xls",
|
metadata
CHANGED
@@ -1,32 +1,25 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: writeexcel
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.14
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 6
|
9
|
-
- 13
|
10
|
-
version: 0.6.13
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Hideo NAKAMURA
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
date: 2012-04-19 00:00:00 Z
|
12
|
+
date: 2012-07-12 00:00:00.000000000 Z
|
19
13
|
dependencies: []
|
20
|
-
|
21
|
-
|
14
|
+
description: Multiple worksheets can be added to a workbook and formatting can be
|
15
|
+
applied to cells. Text, numbers, formulas, hyperlinks and images can be written
|
16
|
+
to the cells.
|
22
17
|
email: cxn03651@msj.biglobe.ne.jp
|
23
18
|
executables: []
|
24
|
-
|
25
19
|
extensions: []
|
26
|
-
|
27
|
-
extra_rdoc_files:
|
20
|
+
extra_rdoc_files:
|
28
21
|
- README.rdoc
|
29
|
-
files:
|
22
|
+
files:
|
30
23
|
- .document
|
31
24
|
- .gitattributes
|
32
25
|
- README.rdoc
|
@@ -200,6 +193,7 @@ files:
|
|
200
193
|
- test/perl_output/merge4.xls
|
201
194
|
- test/perl_output/merge5.xls
|
202
195
|
- test/perl_output/merge6.xls
|
196
|
+
- test/perl_output/more_than_10_sheets_reference.xls
|
203
197
|
- test/perl_output/ole_write_header
|
204
198
|
- test/perl_output/outline.xls
|
205
199
|
- test/perl_output/outline_collapsed.xls
|
@@ -273,36 +267,26 @@ files:
|
|
273
267
|
- writeexcel.rdoc
|
274
268
|
homepage: http://wiki.github.com/cxn03651/writeexcel/
|
275
269
|
licenses: []
|
276
|
-
|
277
270
|
post_install_message:
|
278
271
|
rdoc_options: []
|
279
|
-
|
280
|
-
require_paths:
|
272
|
+
require_paths:
|
281
273
|
- lib
|
282
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
274
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
283
275
|
none: false
|
284
|
-
requirements:
|
285
|
-
- -
|
286
|
-
- !ruby/object:Gem::Version
|
287
|
-
|
288
|
-
|
289
|
-
- 0
|
290
|
-
version: "0"
|
291
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
276
|
+
requirements:
|
277
|
+
- - ! '>='
|
278
|
+
- !ruby/object:Gem::Version
|
279
|
+
version: '0'
|
280
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
292
281
|
none: false
|
293
|
-
requirements:
|
294
|
-
- -
|
295
|
-
- !ruby/object:Gem::Version
|
296
|
-
|
297
|
-
segments:
|
298
|
-
- 0
|
299
|
-
version: "0"
|
282
|
+
requirements:
|
283
|
+
- - ! '>='
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
300
286
|
requirements: []
|
301
|
-
|
302
287
|
rubyforge_project:
|
303
288
|
rubygems_version: 1.8.10
|
304
289
|
signing_key:
|
305
290
|
specification_version: 3
|
306
291
|
summary: Write to a cross-platform Excel binary file.
|
307
292
|
test_files: []
|
308
|
-
|