@OpenApiAll public class ExcelHelper extends java.lang.Object
Constructor and Description |
---|
ExcelHelper(SimulationSession session)
constructor.
|
ExcelHelper(SimulationSession session,
fUML.Semantics.Classes.Kernel.Object_ context)
constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCellValue(java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number atRow,
java.lang.Number atCol)
get value by specific row and column in the excel file.
|
int |
getLatestRowNum(java.lang.String fileName,
java.lang.String sheetName)
Get the latest row number of the sheet in the excel file.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectFromSpreadSheet(java.lang.String fileName,
java.lang.Number rowIndex)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectFromSpreadSheet(java.lang.String fileName,
java.lang.Number rowIndex,
java.lang.Object mappingClass)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectFromSpreadSheet(java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number rowIndex)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectFromSpreadSheet(java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number rowIndex,
java.lang.Object mappingClass)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.Number startRow,
java.lang.Number endRow)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.Number startRow,
java.lang.Number endRow,
java.lang.Object mappingClass)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.Object mappingClass)
Read the excel file and create the fUML ValueList for all rows in excel.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.String name)
Read the excel file and create the fUML ValueList for all rows in excel.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number startRow,
java.lang.Number endRow)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number startRow,
java.lang.Number endRow,
java.lang.Object mappingClass)
Read the excel file and create the fUML ValueList.
|
fUML.Semantics.Classes.Kernel.ValueList |
readObjectsFromSpreadSheet(java.lang.String fileName,
java.lang.String sheetName,
java.lang.Object mappingClass)
Read the excel file and create the fUML ValueList for all rows in excel.
|
void |
setCellValue(java.lang.Object object,
java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number atRow,
java.lang.Number atCol)
Set fUML runtime value to specific row and column in the excel file.
|
void |
updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value,
java.lang.String fileName,
java.lang.Number rowIndex)
update the value of SpreadSheet to fUML runtime object.
|
void |
updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value,
java.lang.String fileName,
java.lang.Number rowIndex,
java.lang.Object mappingClass)
update the value of SpreadSheet to fUML runtime object.
|
void |
updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value,
java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number rowIndex)
update the value of SpreadSheet to fUML runtime object.
|
void |
updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value,
java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number rowIndex,
java.lang.Object mappingClass)
update the value of SpreadSheet to fUML runtime object.
|
void |
writeObjectsToSpreadSheet(java.lang.Object object,
java.lang.String fileName,
java.lang.Number atRow,
boolean isReplace)
Write the fUML runtime value to the excel file.
|
void |
writeObjectsToSpreadSheet(java.lang.Object object,
java.lang.String fileName,
java.lang.Number atRow,
boolean isReplace,
java.lang.Object mappingClass)
Write the fUML runtime value to the excel file.
|
void |
writeObjectsToSpreadSheet(java.lang.Object object,
java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number atRow,
boolean isReplace)
Write the fUML runtime value to the excel file.
|
void |
writeObjectsToSpreadSheet(java.lang.Object object,
java.lang.String fileName,
java.lang.String sheetName,
java.lang.Number atRow,
boolean isReplace,
java.lang.Object mappingClass)
Write the fUML runtime value to the excel file.
|
public ExcelHelper(SimulationSession session)
session
- the running session.public ExcelHelper(SimulationSession session, fUML.Semantics.Classes.Kernel.Object_ context)
session
- the running session.context
- the context of callerpublic int getLatestRowNum(java.lang.String fileName, java.lang.String sheetName)
fileName
- the excel file namesheetName
- the sheet namepublic fUML.Semantics.Classes.Kernel.ValueList readObjectFromSpreadSheet(java.lang.String fileName, java.lang.Number rowIndex)
fileName
- the excel file namerowIndex
- the index of rowpublic fUML.Semantics.Classes.Kernel.ValueList readObjectFromSpreadSheet(java.lang.String fileName, java.lang.Number rowIndex, java.lang.Object mappingClass)
fileName
- the excel file namerowIndex
- the index of rowmappingClass
- the mapping class name String
or mapping class Element
public fUML.Semantics.Classes.Kernel.ValueList readObjectFromSpreadSheet(java.lang.String fileName, java.lang.String sheetName, java.lang.Number rowIndex)
fileName
- the excel file namesheetName
- the sheet namerowIndex
- the index of rowpublic fUML.Semantics.Classes.Kernel.ValueList readObjectFromSpreadSheet(java.lang.String fileName, java.lang.String sheetName, java.lang.Number rowIndex, java.lang.Object mappingClass)
fileName
- the excel file namesheetName
- the sheet namerowIndex
- the index of rowmappingClass
- the mapping class name String
or mapping class Element
public fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.Number startRow, java.lang.Number endRow)
fileName
- the excel file namestartRow
- the start row numberendRow
- the end row numberpublic fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.Number startRow, java.lang.Number endRow, java.lang.Object mappingClass)
fileName
- the excel file namestartRow
- the start row numberendRow
- the end row numbermappingClass
- the mapping class name String
or mapping class Element
public fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.String sheetName, java.lang.Number startRow, java.lang.Number endRow)
fileName
- the excel file namesheetName
- the sheet namestartRow
- the start row numberendRow
- the end row numberpublic fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.Object mappingClass)
fileName
- the excel file namemappingClass
- the mapping class name String
or mapping class Element
public fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.String name)
fileName
- the excel file namename
- the name of Mapping Class or sheet name.public fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.String sheetName, java.lang.Object mappingClass)
fileName
- the excel file namesheetName
- the sheet namemappingClass
- the mapping class name String
or mapping class Element
public fUML.Semantics.Classes.Kernel.ValueList readObjectsFromSpreadSheet(java.lang.String fileName, java.lang.String sheetName, java.lang.Number startRow, java.lang.Number endRow, java.lang.Object mappingClass)
fileName
- the excel file namesheetName
- the sheet namestartRow
- the start row numberendRow
- the end row numbermappingClass
- the mapping class name String
or mapping class Element
public void setCellValue(java.lang.Object object, java.lang.String fileName, java.lang.String sheetName, java.lang.Number atRow, java.lang.Number atCol)
object
- the fUML runtime value (ValueList/Value)fileName
- the excel file namesheetName
- the sheet nameatRow
- the row index numberatCol
- the column index numberpublic java.lang.Object getCellValue(java.lang.String fileName, java.lang.String sheetName, java.lang.Number atRow, java.lang.Number atCol)
fileName
- the excel file namesheetName
- the sheet nameatRow
- the row index numberatCol
- the column index numberpublic void updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value, java.lang.String fileName, java.lang.Number rowIndex)
value
- the runtime objectfileName
- the spreadSheet file pathrowIndex
- the row indexpublic void updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value, java.lang.String fileName, java.lang.String sheetName, java.lang.Number rowIndex)
value
- the runtime objectfileName
- the spreadSheet file pathsheetName
- the sheet namerowIndex
- the row indexpublic void updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value, java.lang.String fileName, java.lang.Number rowIndex, java.lang.Object mappingClass)
value
- the runtime objectfileName
- the spreadSheet file pathrowIndex
- the row indexmappingClass
- the mapping class name String
or mapping class Element
public void updatefUMLValueFromSpreadSheet(fUML.Semantics.Classes.Kernel.StructuredValue value, java.lang.String fileName, java.lang.String sheetName, java.lang.Number rowIndex, java.lang.Object mappingClass)
value
- the runtime objectfileName
- the spreadSheet file pathsheetName
- the sheet namerowIndex
- the row indexmappingClass
- the mapping class name String
or mapping class Element
public void writeObjectsToSpreadSheet(java.lang.Object object, java.lang.String fileName, java.lang.Number atRow, boolean isReplace, java.lang.Object mappingClass)
object
- the fUML runtime value (ValueList/Value)fileName
- the excel file nameatRow
- the row number to write the dataisReplace
- if true, it will replace the existing data
if false, it will insert the data at atRowmappingClass
- the mapping class name String
or mapping class Element
public void writeObjectsToSpreadSheet(java.lang.Object object, java.lang.String fileName, java.lang.String sheetName, java.lang.Number atRow, boolean isReplace)
object
- the fUML runtime value (ValueList/Value)fileName
- the excel file namesheetName
- the sheet nameatRow
- the row number to write the dataisReplace
- if true, it will replace the existing data
if false, it will insert the data at atRowpublic void writeObjectsToSpreadSheet(java.lang.Object object, java.lang.String fileName, java.lang.Number atRow, boolean isReplace)
object
- the fUML runtime value (ValueList/Value)fileName
- the excel file nameatRow
- the row number to write the dataisReplace
- if true, it will replace the existing data
if false, it will insert the data at atRowpublic void writeObjectsToSpreadSheet(java.lang.Object object, java.lang.String fileName, java.lang.String sheetName, java.lang.Number atRow, boolean isReplace, java.lang.Object mappingClass)
object
- the fUML runtime value (ValueList/Value)fileName
- the excel file namesheetName
- the sheet nameatRow
- the row number to write the dataisReplace
- if true, it will replace the existing data
if false, it will insert the data at atRowmappingClass
- the mapping class name String
or mapping class Element