Class ExcelStore
- All Implemented Interfaces:
EditableTableModel
,PopupActivationListener
,Serializable
,Comparable
,EventListener
,ListSelectionListener
,TableModel
Data are copied from the worksheet and are held in memory. Blank lines in the worksheet are ignored. Aftet the table is loaded the original Excel workbook is closed.
Data are loaded using the format of the original Excel worksheet. By default data values will be treated as string values. If a column contains all integer or all numeric values with no blanks then the data will be automatically converted to integers or doubles and the default presentation format for integers and doubles will be used in the TableViewer. However, even a single blank cell in a column will prevent the conversion from string to numeric.
The makeExcelStore(java.lang.String,java.lang.String,int)
method is used to load data in to the table.
The startRow parameter may be used to skip over initial rows that
appear prior to the column headings row.
This class is restricted to tables having a single time period.
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class ca.spatial.table.AttributeStore
SELECT_ADD, SELECT_FROM, SELECT_NEW
-
Method Summary
Modifier and TypeMethodDescriptionstatic RamAttributeStore
makeExcelStore(String workbook, String worksheet, int skipRows)
Construct the in-memory data store from an Excel worksheet.Methods inherited from class ca.spatial.table.RamAttributeStore
addRow, addRow, addRows, clearAllRows, createSummaryTable, createSummaryTable, getCache, getPeriodCount, getRowCount, getValueAt, getYearForPeriod, insertRow, insertRows, moveRow, removeRow, setValueAt
Methods inherited from class ca.spatial.table.AttributeStore
absoluteFile, absoluteFile, absolutePath, absolutePath, addCellEditors, addMenuItems, addPopupActivationListener, addRelate, addRelate, addTableModelListener, addToGlobalStoreList, allowsEditing, booleanValue, booleanValue, buildIndex, calculate, calculateField, calculateField, canIndex, changeSelection, clearSelection, close, compareTo, decodeCharset, doubleValue, doubleValue, exportCSV, exportCSV, exportCSV, exportCSV, exportCSV, exportCSV, exportDBF, exportDBF, exportDBF, exportDBF, exportDBF, findColumn, findColumn, findSimilarColumnNames, getAttributeFormat, getCacheParent, getCachingLayer, getCachingLayer, getCanonicalName, getColumnClass, getColumnCount, getColumnName, getColumnNames, getContextPeriods, getCwd, getEditMode, getFullColumnName, getListSelectionModel, getMinMax, getMinMax, getMinMax, getMinMax, getMinMax, getOpenStore, getOpenStore, getOpenStore, getOpenStores, getPeriod, getPeriodWidth, getRowNodeRemap, getSelectedRowCount, getSelection, getSelection, getSelection, getShortName, getSnapshot, getSnapshot, getStoreByShortName, getStoreByTitle, getSynchronizer, getTableName, getTableSpec, getTitle, getValueAt, hasIndex, identifyRecords, integerValue, integerValue, isCellEditable, isSelectedIndex, isSelectionEmpty, listify, listValue, listValue, lookupRow, makeLu, maybePopup, notifyPopupActivationListeners, openOrReuse, openOrReuse, queryTable, queryTable, quoteIfRequired, relativePath, removeFromGlobalStoreList, removePopupActivationListener, removeTableModelListener, select, select, selectAdd, selectFrom, selectNew, setCwd, setCwd, setEditMode, setListSelectionModel, setPeriod, setRowNodeRemap, setShortName, setTableSpec, setTitle, setValueAt, showCube, showTable, toString, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, uniqueValues, valueChanged
Methods inherited from class javax.swing.table.AbstractTableModel
fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getValueAt, isCellEditable, removeTableModelListener, setValueAt
-
Method Details
-
makeExcelStore
Construct the in-memory data store from an Excel worksheet.- Parameters:
workbook
- the relative path to the Excel workbookworksheet
- the name of the worksheet to useskipRows
- the number of rows to skip before the header row
-