For a single block structured grid, Gambit naturally produces a cell numbering which is structured. You just need to figure out, when cycling over the cells, which of the i,j,k indices (respectively along x, y, and z direction) varies faster, then the second one, etc.