Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.xmlbind
Class ExcelSourceArray2D

    java.lang.Object
      umontreal.iro.lecuyer.xmlbind.ExcelSourceArray2D

    public class ExcelSourceArray2D

extends Object

Represents a source array whose contents is read from a Microsoft Excel workbook. Each row of the sheet with the given name, and contained in the workbook pointed to by a URL becomes a row of the source array, with elements of the row separated using commas. Data is read using JExcel API.

In the XML file, the `URL` attribute of an element representing a Excel source array must be used to indicate the URL of the data file. The `sheetName` attribute can also be used to indicate the name of a sheet. By default, the first sheet is read.

Constructor Summary
`ExcelSourceArray2D(Node node, String uri)`
`ExcelSourceArray2D(URL url)`

Method Summary
`void` | `close()` Closes the workbook associated with this object.
`SourceArray2D` | `getNamedArea(String area)`
`SourceArray2D` | `getSheet(int sheetIndex)` Constructs and returns a source array corresponding to the sheet with index sheetIndex in the workbook.
`SourceArray2D` | `getSheet(String sheetName)` Constructs and returns a source array corresponding to the sheet with name sheetName in the workbook.
`URL` | `getURL()` Returns the URL of the text file containing the values of the array, in CSV format.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExcelSourceArray2D

    public ExcelSourceArray2D(URL url)

### ExcelSourceArray2D

    public ExcelSourceArray2D(Node node,
                              String uri)
                       throws URISyntaxException,
                              MalformedURLException

Throws:
  `URISyntaxException`
  `MalformedURLException`

Method Detail

### getURL

    public URL getURL()

  Returns the URL of the text file containing the values of the array, in CSV format.

  Returns:
    the URL of the CSV data.

### close

    public void close()

  Closes the workbook associated with this object.

### getSheet

    public SourceArray2D getSheet(int sheetIndex)

  Constructs and returns a source array corresponding to the sheet with index sheetIndex in the workbook.

  Parameters:
    `sheetIndex` - the sheet index.
  Returns:
    the source array corresponding to the sheet.

### getSheet

    public SourceArray2D getSheet(String sheetName)

  Constructs and returns a source array corresponding to the sheet with name sheetName in the workbook.

  Parameters:
    `sheetName` - the sheet name.
  Returns:
    the source array corresponding to the sheet.

### getNamedArea

    public SourceArray2D getNamedArea(String area)

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Richard Simard.