bspaulding/Sheets — pull request #1 by mnoble (2012-10-03 15:39:10+00:00)
Title: Don't rely on worksheet_id to match filename

Excel worksheets get an id when they are created. When worksheets are
removed, it seems as though id's are not reassigned, but their filenames
are. For example:

Worksheet (id 1) #=> xl/worksheets/sheet1.xml
Worksheet (id 2) #=> xl/worksheets/sheet2.xml
Worksheet (id 3) #=> xl/worksheets/sheet2.xml

If you delete the second worksheet, the filenames change, but the ids do
not, it seems. What you end up with is:

Worksheet (id 1) #=> xl/worksheets/sheet1.xml
Worksheet (id 3) #=> xl/worksheets/sheet2.xml

The current XLSX parser assumes the filename of a worksheet contains
its id. This is not the case for the example above.

This change makes it load worksheets sequentually, from 1 to the number
of worksheets, instead of id (which doesn't change). Assuming the
worksheet filenames are changed when adding/removing worksheets, this
should work.