Skip to content

Commit

Permalink
Merge pull request #487 from matzko/master
Browse files Browse the repository at this point in the history
Don't error when there are blank children elements.
  • Loading branch information
chopraanmol1 authored Jan 18, 2019
2 parents e7996b0 + ed09cd1 commit 2f94d63
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/roo/excelx/sheet_doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def cell_from_xml(cell_xml, hyperlink, coordinate, empty_cell=true)
end
end

create_empty_cell(coordinate)
create_empty_cell(coordinate, empty_cell)
end

def create_empty_cell(coordinate, empty_cell)
Expand Down
11 changes: 11 additions & 0 deletions spec/lib/roo/excelx/sheet_doc_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

require "spec_helper"

describe Roo::Excelx::SheetDoc do
subject(:blank_children) { Roo::Excelx.new("test/files/blank_children.xlsx") }

example "#last_row" do
expect(subject.last_row).to eq 3
end
end
Binary file added test/files/blank_children.xlsx
Binary file not shown.

0 comments on commit 2f94d63

Please sign in to comment.