Make parsing large spreadsheets more efficient, and fix premature ending on some spreadsheets