public void setSheetOrder(String sheetname, int pos ) {int sheetNumber = getSheetIndex(sheetname);boundsheets.add(pos, boundsheets.remove(sheetNumber));int initialBspos = records.getBspos();int pos0 = initialBspos - (boundsheets.size() - 1);org.apache.poi.hssf.record.Record removed = records.get(pos0 + sheetNumber);records.remove(pos0 + sheetNumber);records.add(pos0 + pos, removed);records.setBspos(initialBspos);}
public void SetSheetOrder(String sheetname, int pos){int sheetNumber = GetSheetIndex(sheetname);BoundSheetRecord sheet = boundsheets[sheetNumber];boundsheets.RemoveAt(sheetNumber);boundsheets.Insert(pos, sheet);int pos0 = records.Bspos - (boundsheets.Count - 1);Record removed = records[(pos0 + sheetNumber)];records.Remove(pos0 + sheetNumber);records.Add(pos0 + pos, removed);}