# Class: Chart

## helma.Chart(fpath, prefix, sheetName)

Instances of this class are capable of reading Excel spreadsheets and rendering them as XHTML table. Internally helma.Chart uses the Java Excel API by Andy Khan.

## Constructor

#### new Chart(fpath, prefix, sheetName)

Creates a new instance of helma.Chart

##### Parameters:

Name | Type | Description
--- | --- | ---
`fpath` | String | The path to the spreadsheet file
`prefix` | String | An optional prefix to use for all stylesheet classes within the rendered table
`sheetName` | String | The name of the sheet within the spreadsheet file to render. If this argument is omitted, the first sheet is rendered.

Author:
  - Tobi Schaefer
Source:
  - helma/Chart.js, line 51

##### Returns:

A newly created helma.Chart instance.

### Methods

#### render()

Renders the Excel spreadsheet as XHTML table.

Source:
  - helma/Chart.js, line 100

#### renderAsString()

Returns the spreadsheet as rendered XHTML table.

Source:
  - helma/Chart.js, line 158

##### Returns:

The rendered spreadsheet table

#### (static) example(file)

A simple example for using helma.Chart that renders the passed file as XHTML table to response.

##### Parameters:

Name | Type | Description
--- | --- | ---
`file` | String | The path to the Excel spreadsheet file

Source:
  - helma/Chart.js, line 187