Get the associated raster sheets for a sheet number. Create it if needed.

@param sheet The sheet number
@return The raster sheets collection found.
555220
private List<SpriteTiled> getRasters(Integer sheet)
    {
        return rasterSheets.computeIfAbsent(sheet, s ->
        {
            final List<SpriteTiled> rasters = new ArrayList<>(RasterImage.MAX_RASTERS);
            rasterSheets.put(s, rasters);
            return rasters;
        });
    }
452477
protected String[] readLine(HSSFSheet sheet, int rowIndex) {
    HSSFRow row = sheet.getRow(rowIndex);
    logger.debug("values count:{}", row.getLastCellNum());
    List<String> attrList = CollectUtils.newArrayList();
    for (int i = 0; i < row.getLastCellNum(); i++) {
      HSSFCell cell = row.getCell(i);
      if (null != cell) {
        String attr = cell.getRichStringCellValue().getString();
        if (Strings.isEmpty(attr)) {
          break;
        } else {
          attrList.add(attr.trim());
        }
      } else {
        break;
      }
    }
    String[] attrs = new String[attrList.size()];
    attrList.toArray(attrs);
    logger.debug("has attrs {}", attrs);
    return attrs;
  }
536689
private static void exportSheets(Xml nodeSheets, Collection<String> sheets)
    {
        for (final String sheet : sheets)
        {
            final Xml nodeSheet = nodeSheets.createChild(NODE_TILE_SHEET);
            nodeSheet.setText(sheet);
        }
    }
1277892
public static Cell[] getColumn(final Sheet sheet, final int col) {
        ArgUtils.notNull(sheet, "sheet");

        int maxRow = getRows(sheet);
        Cell[] cells = new Cell[maxRow];
        for(int i=0; i < maxRow; i++) {
            Row rows = sheet.getRow(i);
            if(rows == null) {
                rows = sheet.createRow(i);

            }

            Cell cell = rows.getCell(col);
            if(cell == null) {
                cell = rows.createCell(col, CellType.BLANK);
            }

            cells[i] = cell;
        }

        return cells;
    }
389451
public static Collection<SpriteTiled> extract(Collection<ImageBuffer> tiles, int horizontalTiles)
    {
        final Surface surface = getSheetSize(tiles, horizontalTiles);
        final int horizontals = surface.getWidth();
        final int verticals = surface.getHeight();
        final int tilesPerSheet = Math.min(tiles.size(), horizontals * verticals);
        final Collection<SpriteTiled> sheets = new ArrayList<>();

        ImageBuffer sheet = null;
        Graphic g = null;
        int number = 0;
        int tw = 0;
        int th = 0;

        for (final ImageBuffer tile : tiles)
        {
            if (g == null)
            {
                tw = tile.getWidth();
                th = tile.getHeight();

                final int width = Math.max(tw, horizontals * tw);
                final int height = Math.max(th, verticals * th);
                sheet = Graphics.createImageBuffer(width, height, tile.getTransparentColor());
                g = sheet.createGraphic();
            }
            final int x = number % horizontals;
            final int y = (int) Math.floor(number / (double) horizontals);
            g.drawImage(tile, x * tw, y * th);
            number++;

            if (number >= tilesPerSheet)
            {
                g.dispose();
                sheets.add(Drawable.loadSpriteTiled(Graphics.getImageBuffer(sheet), tw, th));
                sheet = null;
                g = null;
                number = 0;
            }
        }

        return sheets;
    }
86508
@SuppressWarnings("unchecked")
	public T setSheet(int sheetIndex) {
		try {
			this.sheet = this.workbook.getSheetAt(sheetIndex);
		} catch (IllegalArgumentException e) {
			this.sheet = this.workbook.createSheet();
		}
		if (null == this.sheet) {
			this.sheet = this.workbook.createSheet();
		}
		return (T) this;
	}
956387
public static void removeOtherSheets(Sheet sheet) {
        val wb = sheet.getWorkbook();

        List<String> deletedNames = Lists.newArrayList();
        for (int i = 0; i < wb.getNumberOfSheets(); ++i) {
            val sheetName = wb.getSheetName(i);
            if (!sheetName.equals(sheet.getSheetName())) {
                deletedNames.add(sheetName);
            }
        }

        deletedNames.forEach(x -> wb.removeSheetAt(wb.getSheetIndex(x)));
    }
194958
public static Cell[] getRow(final Sheet sheet, final int row) {
        ArgUtils.notNull(sheet, "sheet");

        Row rows = sheet.getRow(row);
        if(rows == null) {
            rows = sheet.createRow(row);
        }
        int maxColumn = getColumns(sheet);
        Cell[] cells = new Cell[maxColumn];
        for(int i=0; i < maxColumn; i++) {
            Cell cell = rows.getCell(i);
            if(cell == null) {
                cell = rows.createCell(i, CellType.BLANK);
            }
            cells[i] = cell;
        }

        return cells;
    }
1102767
def sheets(self):
        
        # http://www.openoffice.org/api/docs/common/ref/com/sun/star/sheet/XSpreadsheetDocument.html#getSheets
        try:
            return self._sheets
        except AttributeError:
            target = self._target.getSheets()
            self._sheets = SpreadsheetCollection(self, target)
        return self._sheets
70041
public XceliteSheet getSheet(String sheetName) {
    Sheet sheet = workbook.getSheet(sheetName);
    if (sheet == null) {
      throw new XceliteException(String.format("Could not find sheet named \"%s\"", sheetName));
    }
    return new XceliteSheetImpl(sheet, file);
  }
368543
public List<Page> getPages() {
        Collection collection = collections.get("page");
        if (collection != null) {
            List<Page> pages = collection.getPages();
            return ImmutableList.copyOf(pages);
        }
        return Collections.emptyList();
    }
954995
public boolean contains(Integer sheet, int number)
    {
        for (final TileRef current : tiles)
        {
            if (current.getSheet().equals(sheet) && current.getNumber() == number)
            {
                return true;
            }
        }
        return false;
    }
547824
private static Collection<String> importSheets(Xml nodeSheets)
    {
        final Collection<Xml> children = nodeSheets.getChildren(NODE_TILE_SHEET);
        final Collection<String> sheets = new ArrayList<>(children.size());

        for (final Xml nodeSheet : children)
        {
            final String sheetFilename = nodeSheet.getText();
            sheets.add(sheetFilename);
        }

        return sheets;
    }
755976
public static List<String> getColumnOfSheet(Sheet sheet) throws ReadExcelException {
        // 获取列名
        Row row = sheet.getRow(1);
        if (row == null) {
            throw new ReadExcelException("The Column name is invalid！");
        }
        List<String> columnList = new ArrayList<String>();
        // 遍历列名并存入List中
        for (int i = 0; i < row.getLastCellNum(); i++) {
            Cell cell = row.getCell(i);
            if (cell != null) {
                columnList.add(cell.getStringCellValue());
            }
        }
        return columnList;
    }
2607
public static String[] getXlsxWorksheets(InputStream stream) 
        throws IOException
    {
        XlsxWorkbook workbook = XlsxWorkbook.getWorkbook(stream);
        String[] sheets = workbook.getSheetNames();
        workbook.close();
        return sheets;
    }
758092
@Override
    public String[] getSheetNames()
    {
        String[] ret = null;
        if(sheets != null)
        {
            ret = new String[sheets.size()];
            for(int i = 0; i < sheets.size(); i++)
            {
                Sheet sheet = (Sheet)sheets.get(i);
                ret[i] = sheet.getName();
            }
        }
        return ret;
    }
468719
public Reader<T> sheet(String sheetName) {
        if (StringUtil.isEmpty(sheetName)) {
            throw new IllegalArgumentException("sheet cannot be empty");
        }
        this.sheetName = sheetName;
        return this;
    }