writeexcel 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b531b36875f0418a1d22f1eacac9cf7f1e811ff
4
- data.tar.gz: 0bc6f8b78768aa2e2ce03b97066d10d1b751ff63
3
+ metadata.gz: 47e11786c44acb989d0bdf6892093094dfdae8b1
4
+ data.tar.gz: 4f099e9f6626d563f5892ad677ef5051596eddc2
5
5
  SHA512:
6
- metadata.gz: 6323cf3fab002c0211284e4fe5f0e41038af0ca322d1a79197b7e52cdd23c3d2a36982e7871d52022cbfa467d03f24f9bd56e81442f440ffa633401ada8fe71a
7
- data.tar.gz: 05e0fc08c9824fb5590f267919fea15c1525bf0c34bae99d01842392885e921ac57a382d3e989ad6d139dbfdd08087f644da3002ef1874e1281a722532ed448e
6
+ metadata.gz: bc1795bd107484350cfa48dd1263b61f6280398051f158334992a669e359a98b4987bd7c226453853c7730132a19560fbda70592059d9363d9a8b4e2ce41b478
7
+ data.tar.gz: 79a2399de75607e4f8f01db705aeee56be70af8088064d6259c217fdb999a6796769fb144443f1290cca8c829decb50e366ed413c775289d8fbaccf48e3d3743
@@ -2,6 +2,8 @@
2
2
 
3
3
  Write to a cross-platform Excel binary file.
4
4
 
5
+ {<img src="https://badge.fury.io/rb/writeexcel.png" alt="Gem Version" />}[http://badge.fury.io/rb/writeexcel]
6
+
5
7
  == Description
6
8
 
7
9
  This library is converted from Spreadsheet::WriteExcel module of Perl.
@@ -82,6 +84,9 @@ Example Code:
82
84
  * and ......
83
85
 
84
86
  == Recent Change
87
+ v1.0.3
88
+ * Bug fix issue 29. bug in extern sheet reference.
89
+
85
90
  v1.0.2
86
91
  * Bug fix issue 28. bug in non ascii worksheet names.
87
92
  * Bug fix in testcase issue 28. fail due to defferent timezone.
@@ -1,5 +1,5 @@
1
1
  require 'writeexcel'
2
2
 
3
3
  class WriteExcel < Workbook
4
- VERSION = "1.0.2"
4
+ VERSION = "1.0.3"
5
5
  end
@@ -1773,8 +1773,7 @@ def store_externsheet # :nodoc:
1773
1773
 
1774
1774
  # Get the external refs
1775
1775
 
1776
- ext = @ext_refs.keys.sort {|a, b| a.split(':')[0].to_i <=> b.split(':')[0].to_i}
1777
-
1776
+ ext = @ext_refs.keys.sort {|a, b| @ext_refs[a].to_i <=> @ext_refs[b].to_i}
1778
1777
 
1779
1778
  # Change the external refs from stringified "1:1" to [1, 1]
1780
1779
  ext.map! {|e| e.split(/:/).map! {|v| v.to_i} }
@@ -3336,6 +3336,26 @@ def test_set_first_sheet
3336
3336
  compare_file("#{PERL_OUTDIR}/set_first_sheet.xls", @file)
3337
3337
  end
3338
3338
 
3339
+ def test_sheet_name
3340
+ workbook = WriteExcel.new(@file)
3341
+
3342
+ worksheet = workbook.add_worksheet("Second")
3343
+ worksheet.write(0, 0, 2)
3344
+
3345
+ worksheet = workbook.add_worksheet("First")
3346
+ worksheet.write(0, 0, 1)
3347
+
3348
+ worksheet = workbook.add_worksheet("Third")
3349
+ worksheet.write(0, 0, "First :")
3350
+ worksheet.write_formula(0, 1, %q{='First'!A1})
3351
+ worksheet.write(1, 0, "Second :")
3352
+ worksheet.write_formula(1, 1, %q{='Second'!A1})
3353
+ workbook.close
3354
+
3355
+ # do assertion
3356
+ compare_file("#{PERL_OUTDIR}/sheet_name.xls", @file)
3357
+ end
3358
+
3339
3359
  def test_store_formula
3340
3360
  workbook = WriteExcel.new(@file)
3341
3361
  worksheet = workbook.add_worksheet()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: writeexcel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hideo NAKAMURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-08 00:00:00.000000000 Z
11
+ date: 2013-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -230,6 +230,7 @@ files:
230
230
  - test/perl_output/regions.xls
231
231
  - test/perl_output/right_to_left.xls
232
232
  - test/perl_output/set_first_sheet.xls
233
+ - test/perl_output/sheet_name.xls
233
234
  - test/perl_output/stats.xls
234
235
  - test/perl_output/stocks.xls
235
236
  - test/perl_output/store_formula.xls
@@ -388,6 +389,7 @@ test_files:
388
389
  - test/perl_output/regions.xls
389
390
  - test/perl_output/right_to_left.xls
390
391
  - test/perl_output/set_first_sheet.xls
392
+ - test/perl_output/sheet_name.xls
391
393
  - test/perl_output/stats.xls
392
394
  - test/perl_output/stocks.xls
393
395
  - test/perl_output/store_formula.xls