Skip to content

Commit

Permalink
Don't error when there are blank children elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
matzko committed Jan 18, 2019
1 parent e7996b0 commit ed09cd1
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 ed09cd1

Please sign in to comment.