public interface IExcelDataWorkbook
Represents a workbook that provides access to Excel data for general use.
| Modifier and Type | Method and Description |
|---|---|
IExcelDataCell |
getCell(int worksheetIndex,
int row,
int column)
Retrieves a cell from the specified worksheet using its index and cell coordinates.
|
IExcelDataCell |
getCell(int worksheetIndex,
java.lang.String cellName)
Retrieves a cell from the specified worksheet using its index and Excel-style cell name (e.g., "B2").
|
IExcelDataCell |
getCell(java.lang.String worksheetName,
int row,
int column)
Retrieves a cell from the specified worksheet using its name and cell coordinates.
|
IExcelDataCell |
getCell(java.lang.String worksheetName,
java.lang.String cellName)
Retrieves a cell from the specified worksheet using Excel-style cell name (e.g., "B2").
|
com.aspose.ms.System.Collections.Generic.List<IExcelDataCell> |
getCells(java.lang.String formula,
boolean skipHiddenCells)
Retrieves a collection of cells from the workbook that match the specified formula.
|
com.aspose.ms.System.Collections.Generic.Dictionary<java.lang.Integer,java.lang.String> |
getChartsFromWorksheet(java.lang.String worksheetName)
Retrieves a dictionary containing the indexes and names of all charts in the specified worksheet of an Excel workbook.
|
com.aspose.ms.System.Collections.Generic.List<java.lang.String> |
getWorksheetNames()
Retrieves the names of all worksheets contained in the Excel workbook.
|
com.aspose.ms.System.Collections.Generic.List<IExcelDataCell> getCells(java.lang.String formula, boolean skipHiddenCells)
Retrieves a collection of cells from the workbook that match the specified formula.
Example:ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); List<IExcelDataCell> cells = wb.getCells("Sheet1!A2:A6", false); System.out.println(cells.size()); //Output: 5
formula - A formula or range expression (e.g., "Sheet1!A1:B3") used to identify target cells.skipHiddenCells - If true, hidden cells (e.g., in hidden rows or columns) will be excluded from the result.IExcelDataCell getCell(int worksheetIndex, int row, int column)
Retrieves a cell from the specified worksheet using its index and cell coordinates.
Example:ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); IExcelDataCell cell = wb.getCell(1, 1, 1); System.out.println(cell.getValue().toString());
worksheetIndex - Zero-based index of the worksheet.row - Zero-based row index of the cell.column - Zero-based column index of the cell.IExcelDataCell getCell(java.lang.String worksheetName, int row, int column)
Retrieves a cell from the specified worksheet using its name and cell coordinates.
Example:ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); IExcelDataCell cell = wb.getCell("Sheet1", 1, 1); System.out.println(cell.getValue().toString());
worksheetName - The name of the worksheet.row - Zero-based row index of the cell.column - Zero-based column index of the cell.IExcelDataCell getCell(int worksheetIndex, java.lang.String cellName)
Retrieves a cell from the specified worksheet using its index and Excel-style cell name (e.g., "B2").
Example:ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); IExcelDataCell cell = wb.getCell(1, "B2"); System.out.println(cell.getValue().toString());
worksheetIndex - Zero-based index of the worksheet.cellName - The Excel-style cell reference (e.g., "A1", "C5").IExcelDataCell getCell(java.lang.String worksheetName, java.lang.String cellName)
Retrieves a cell from the specified worksheet using Excel-style cell name (e.g., "B2").
Example:ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); IExcelDataCell cell = wb.getCell("Sheet1", "B2"); System.out.println(cell.getValue().toString());
worksheetName - The name of the worksheet.cellName - The Excel-style cell reference (e.g., "A1", "C5").com.aspose.ms.System.Collections.Generic.Dictionary<java.lang.Integer,java.lang.String> getChartsFromWorksheet(java.lang.String worksheetName)
Retrieves a dictionary containing the indexes and names of all charts in the specified worksheet of an Excel workbook.
Example:ExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); Dictionary.Enumerator<Integer, String> sheetCharts = wb.getChartsFromWorksheet("worksheetName").iterator(); while (sheetCharts.hasNext()) { KeyValuePair<Integer, String> chart = sheetCharts.next(); System.out.println(chart.getKey() + " : " + chart.getValue()); }
worksheetName - The name of the worksheet to search for charts.com.aspose.ms.System.Collections.Generic.List<java.lang.String> getWorksheetNames()
Retrieves the names of all worksheets contained in the Excel workbook.
Example:IExcelDataWorkbook wb = new ExcelDataWorkbook(testFile); List<String> sheetNames = wb.getWorksheetNames(); for (String name : sheetNames) System.out.println(name);
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.