I did some digging through the rubyXL code on github and it looks like there is a bug in the decompress method.
files['styles'] = Nokogiri::XML.parse(File.open(File.join(dir_path,'xl','styles.xml'),'r'))
@num_sheets = files['workbook'].css('sheets').children.size
@num_sheets = Integer(@num_sheets)
#adds all worksheet xml files to files hash
i=1
1.upto(@num_sheets) do
filename = 'sheet'+i.to_s # <----- BUG IS HERE
files[i] = Nokogiri::XML.parse(File.open(File.join(dir_path,'xl','worksheets',filename+'.xml'),'r'))
i=i+1
end
This block of code makes an assumption about sheet numbering in excel which is not true. This code simply counts the number of sheets, and assigns them numerically. However if you delete a sheet then create a new sheet the numerical sequence is broken.
If you check your Lab Data 1.xlsx
file you will see that there is no sheet6 if you pull up the vba developer window (by pressing alt + F11) you should see something like
As you can see this arrangement will defeat the for loop and cause an exception when i = 6.