org.formulacompiler.spreadsheet
Interface SpreadsheetLoader


public interface SpreadsheetLoader

Allows loading of spreadsheets from external sources (like Excel files).

This interface is an API only. Do not implement it yourself.

Author:
peo
See Also:
SpreadsheetCompiler.loadSpreadsheet(String, InputStream, SpreadsheetLoader.Config)

Nested Class Summary
static class SpreadsheetLoader.Config
          Configuration data for new instances of SpreadsheetLoader.
static interface SpreadsheetLoader.Factory
          Factory interface for ImplementationLocator.getInstance(Class).
 
Method Summary
 Spreadsheet loadFrom(java.lang.String _originalFileName, java.io.InputStream _stream)
          Loads a spreadsheet stream into an AFC spreadsheet model.
 

Method Detail

loadFrom

Spreadsheet loadFrom(java.lang.String _originalFileName,
                     java.io.InputStream _stream)
                     throws java.io.IOException,
                            SpreadsheetException
Loads a spreadsheet stream into an AFC spreadsheet model. The loader to use is determined by giving each registered loader a look at the file name. The first one that signals it can handle it is used.

Parameters:
_originalFileName - is the complete file name of the original spreadsheet file (for example Test.xls or Test.xml).
Returns:
The spreadsheet model loaded from the file.
Throws:
java.io.IOException - when there is any proplem accessing the file. May also throw runtime exceptions when there are problems in file.
SpreadsheetException