simple_xlsx_reader 0.9.5 → 0.9.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ ### 0.9.6
2
+
3
+ * Fix worksheet indexes when worksheets have been deleted
4
+
1
5
  ### 0.9.5
2
6
 
3
7
  * Fix inlineStr support (broken by formula support commit)
@@ -89,8 +89,8 @@ module SimpleXlsxReader
89
89
  # For internal use; translates source xml to Sheet objects.
90
90
  class Mapper < Struct.new(:xml)
91
91
  def load_sheets
92
- sheet_toc.map do |(sheet_name, sheet_number)|
93
- parse_sheet(sheet_name, xml.sheets[sheet_number])
92
+ sheet_toc.each_with_index.map do |(sheet_name, sheet_number), i|
93
+ parse_sheet(sheet_name, xml.sheets[i]) # sheet_number is *not* the index into xml.sheets
94
94
  end
95
95
  end
96
96
 
@@ -182,7 +182,7 @@ module SimpleXlsxReader
182
182
  # Excel doesn't record types for some cells, only its display style, so
183
183
  # we have to back out the type from that style.
184
184
  #
185
- # Some of these styles can be determined from a known set (see NumFmtMap),
185
+ # Some of these styles can be determined from a known set (see NumFmtMap),
186
186
  # while others are 'custom' and we have to make a best guess.
187
187
  #
188
188
  # This is the array of types corresponding to the styles a spreadsheet
@@ -1,3 +1,3 @@
1
1
  module SimpleXlsxReader
2
- VERSION = "0.9.5"
2
+ VERSION = "0.9.6"
3
3
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: simple_xlsx_reader
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.5
5
+ version: 0.9.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Woody Peterson
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-29 00:00:00.000000000 Z
12
+ date: 2013-06-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri