User Tools

Site Tools


excel_file_adaptor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

excel_file_adaptor [2023/11/20 09:29]
montse
excel_file_adaptor [2025/03/14 10:45] (current)
ale
Line 10: Line 10:
 ===== Initialization Parameters ===== ===== Initialization Parameters =====
  
-  * **FilePath:​** ​Represents ​the full path and name of the Excel file that represents this instance of the Excel adaptor. +  * **FilePath:​** ​represents ​the full path and name of the Excel file that represents this instance of the Excel adaptor
-  * **NumSheet:​** ​Indicates ​the number of the sheet within the Excel workbook on which we want to work. +  * **Password(Opt.)**:​ indicates the password with which the Excel file will be protected. It is an optional parameter
-  * **Template:​** ​If checked-in, the file will be created or overwriten in any case, no matter if the checkbox '​Create/​Overwrite'​ has been checked-in. +  * **NumSheet:​** ​indicates ​the number of the sheet within the Excel workbook on which we want to work. 
-  * **Template File:​** ​This is the name of the template file used for creating the excel file for testing. In case the Template checkbox (see above) is checked-in, this field is mandatory. +  * **Template:​** ​if checked-in, the file will be created or overwriten in any case, no matter if the checkbox '​Create/​Overwrite'​ has been checked-in. 
-  * **Create/​Overwrite:​** ​When the checkbox is checked-in, TAST will create a new file or overwrite it if the file already exists. +  * **Template File:​** ​this is the name of the template file used for creating the excel file for testing. In case the Template checkbox (see above) is checked-in, this field is mandatory. 
-  * **Use first line as column name:​** ​Checking ​this makes it so the first row is skipped from any of the functions, and is counted as the name of each of the columns. So if you search for the cell in Column 1 and Row 1, it will be the cell in Column 1 and Row 2 instead.+  * **Create/​Overwrite:​** ​when the checkbox is checked-in, TAST will create a new file or overwrite it if the file already exists. 
 +  * **Use first line as column name:​** ​checking ​this makes it so the first row is skipped from any of the functions, and is counted as the name of each of the columns. So if you search for the cell in Column 1 and Row 1, it will be the cell in Column 1 and Row 2 instead.
  
  
 ===== Functions ===== ===== Functions =====
  
-  * **addSheet:​** ​Adds a new sheet with the name that the user puts as parameter.+  * **addSheet:​** ​adds a new sheet with the name that the user puts as parameter.
  
-  * **clearCell:​** ​Allows ​the user to delete the value of a cell in the active Excel sheet in the adapter. The row and num parameters indicate the cell. +  * **clearCell:​** ​allows ​the user to delete the value of a cell in the active Excel sheet in the adapter. The row and num parameters indicate the cell. 
  
-  * **clearCellByColumnName:​** ​Allows ​the user to delete the value of a cell in the active Excel sheet in the adapter. The parameters row and columnName indicate the cell, where columnName is the value of the first cell in the column to be selected. ​+  * **clearCellByColumnName:​** ​allows ​the user to delete the value of a cell in the active Excel sheet in the adapter. The parameters row and columnName indicate the cell, where columnName is the value of the first cell in the column to be selected. ​
        
-  * **deleteSheet:​** ​Allows ​the user to delete an Excel sheet of the current workbook. Using the sheet name or index as input parameters. It returns a Boolean to indicate the operation result. If the deleted sheet was the active sheet in that moment, then the first sheet in the book will be the new active sheet.+  * **deleteSheet:​** ​allows ​the user to delete an Excel sheet of the current workbook. Using the sheet name or index as input parameters. It returns a Boolean to indicate the operation result. If the deleted sheet was the active sheet in that moment, then the first sheet in the book will be the new active sheet.
  
-  * **generateFileAsEvidence():​ ** Generates ​a copy of the Excel file in its current state to add as evidence+  * **generateFileAsEvidence():​ ** generates ​a copy of the Excel file in its current state to add as evidence.
-   +
-  * **getCellValue (CellReference):​** This function returns the value of a cell with the reference of a said cell (e.g.: C7, C12, D2…); works with uppercase and lower case.+
  
-  * **getColumnByRowSearch():​** Return ​TastDataString,​ that contains ​the value of the indicated column to retrieve, if the value matches with searchColumn parameterAs imput parameters there are (SearchRow, SearchValue y ColumnToRetrieve).+  * **generateSheetFromTastRow**: the function copies the TastRowValues received under the Input Row parameter over the active sheet or over new sheet created with the name given by the New Sheet Name parameter, if it has been populated. In that case the new sheet will remain as active sheet in the bookThe copy will be performed over the line number specified by the Target Line parameter when First Line for Header parameter ​(that will override the indicator Use first line as column names in the adaptoris deactivated,​ but in next line if it is activated.
  
-  * **getExcelSheet(SheetNum):​** Reads the Excel worksheet indicated ​by the NumSheet ​parameter ​and returns ​the results ​as a variable of type TastTableData to the executor to allow working with the data in later steps of the diagram.+  * **generateSheetFromTastTable**the function copies the TastTableData received under the Input Table parameter over a new sheet created ​ with the name given by the New Sheet Name parameter. This new sheet will remain as the active sheet in the book. The parameter First Line for Header will override the Use first line as column names check in the adaptor and, if the parameter is active the copy will be performed from the first line in the sheet, but if it isn’t the copy will be performed from the second line in the sheet.
  
-  * **getNumColumns():​** Returns ​the number ​of columns ​of the TastTableData generated when reading ​the Excel sheetWhen you introduce new columns in the Excel, you have to put before ​setSheet so that it counts ​the new columns.+  * **getActiveSheetIndex**: allows you to recover ​the index of the active sheet of the Excel file. 
 +    
 +  * **getCellValue (CellReference):​** this function returns ​the value of cell with the reference of a said cell (e.g.: C7, C12, D2…); works with uppercase and lower case.
  
-  * **getNumRows():** Returns ​the number of rows of the TastTableData generated when reading ​the Excel sheetWhen you introduce new rows in the Excelyou have to put before a setSheet so that it counts the new rows.+  * **getColumnByRowSearch():** return a TastDataString,​ that contains ​the value of the indicated column to retrieve, if the value matches with searchColumn parameterAs imput parameters there are (SearchRowSearchValue y ColumnToRetrieve).
  
-  * **getNumValueSearchOnColumn:** Allows ​the user to search a value on  ​the selected column ​and it returns the number ​of times the value appears in the column. In the mapping the user puts the value to find in SearchValue field and the number ​ of column in Column field.+  * **getExcelSheet(SheetNum):** reads the Excel worksheet indicated by the NumSheet parameter ​and returns the results as a variable ​of type TastTableData to the executor to allow working with the data in later steps of the diagram.
  
-  * **getRowByColumnSearch():** Returns a TastTableData,​ that contains ​the subset ​of rows in which the column has the indicated valueAs imput parameters we have with SearchColumn and SearchValue.+  * **getNumColumns():** returns ​the number of columns ​of the TastTableData generated when reading ​the Excel sheetWhen you introduce new columns in the Excel, you have to put before a setSheet so that it counts the new columns.
  
-  * **getTableValue(RowNum,​ ColNum):​** ​Returns ​the value contained in the cell indicated by the Position parameter that is filled with the RowNum and ColNum values.+  ​* **getNumRows():​** returns the number of rows of the TastTableData generated when reading the Excel sheet. When you introduce new rows in the Excel, you have to put before a setSheet so that it counts the new rows. 
 + 
 +  * **getNumValueSearchOnColumn:​** allows the user to search a value on  the selected column and it returns the number of times the value appears in the column. In the mapping the user puts the value to find in SearchValue field and the number ​ of column in Column field. 
 + 
 +  * **getNumberOfSheets**:​ allows you to recover the number of sheets in an Excel file. 
 + 
 +  * **getRowByColumnSearch():​** returns a TastTableData,​ that contains the subset of rows in which the column has the indicated value. As imput parameters we have with SearchColumn and SearchValue. 
 + 
 +  ​* **getTableValue(RowNum,​ ColNum):​** ​returns ​the value contained in the cell indicated by the Position parameter that is filled with the RowNum and ColNum values.
        
-  * **getTableValueByColumnName():​** ​Allows ​to retrieve the value in a cell of an excel file, selecting as parameters the name of the column (ColName) and the numbers of rows to retrieve (RowNum).+  * **getTableValueByColumnName():​** ​allows ​to retrieve the value in a cell of an excel file, selecting as parameters the name of the column (ColName) and the numbers of rows to retrieve (RowNum)
 + 
 +  * **getValuesbyPosition():​** returns an array of values corresponding to the cell positions indicated by the parameters.
  
-  * **getValuesbyPosition():** Returns an array of values corresponding to the cell positions ​indicated by the parameters.+  * **newFile(FilePath):** creates or overwrites a file, with the path and the name indicated by the parameter filePath"​.\\ If the file doesn´t exist, TAST will create it, as an empty file.\\ If the file exists, TAST will delete the current file, and it will create a new empty one.
  
-  * **newFile(FilePath):​** Creates or overwrites a file, with the path and the name indicated ​by the parameter ​filePath"​.\\ If the file doesn´t existTAST will create it, as an empty file.\\ If the file exists, TAST will delete ​the current file, and it will create a new empty one.+  * **renameSheet**the function renames ​the sheet specified ​by the Old Sheet Name parameter ​(wich may contains an existing sheet name in the book or its ordinal)or the current sheet if this parameter hasn’t been populatedThe new name given to the sheet will be taken from the New Sheet Name Parameter, and the renamed sheet will remain as the active sheet in the book.
  
-  * **setCellValue (CellReference,​ value):​** ​This function sets the value of a cell with the reference of a said cell (e.g.: C7, C12, D2…), works with uppercase and lower case.+  * **setCellValue (CellReference,​ value):​** ​this function sets the value of a cell with the reference of a said cell (e.g.: C7, C12, D2…), works with uppercase and lower case.
  
-  * **setCellValueOneParameter:​** ​Same as setCellValue,​ but in one parameter instead of two. Format: cellReference;​ cellValue.+  * **setCellValueOneParameter:​** ​same as setCellValue,​ but in one parameter instead of two. Format: cellReference;​ cellValue.
  
-  * **setColumnValues():​** ​Generates ​the Column values in the Auxiliary Excel file, based on the value indicated by the parameters Column (Input parameters are ColNum and ValueCell), value1, value2, etc. +  * **setColumnValues():​** ​generates ​the Column values in the Auxiliary Excel file, based on the value indicated by the parameters Column (Input parameters are ColNum and ValueCell), value1, value2, etc. 
  
-  * **setHeader():​** ​Generates ​the headers in the row 1 Excel file," based on the value indicated by the parameters ValueHeader1,​ ValueHeader2,​ etc.+  * **setHeader():​** ​generates ​the headers in the row 1 Excel file," based on the value indicated by the parameters ValueHeader1,​ ValueHeader2,​ etc.
  
-  * **setRowValues():​** ​Generates ​the Row values in the Auxiliary Excel file, based on the value indicated by the parameters Row, (Input parameters are RowNum and ValueCell), value1, value2, etc. +  * **setRowValues():​** ​generates ​the Row values in the Auxiliary Excel file, based on the value indicated by the parameters Row, (Input parameters are RowNum and ValueCell), value1, value2, etc.
  
-  * **setSheet:​** ​Allows ​the user to select the sheet which will be active in the adaptor. Once you set up the sheet as active, all the functions of reading and writing executed, will work on the selected sheet. (Imput parameter “Name”).+  * **setSheet:​** ​allows ​the user to select the sheet which will be active in the adaptor. Once you set up the sheet as active, all the functions of reading and writing executed, will work on the selected sheet. (Imput parameter “Name”).
  
-  * **setTableValue():​** ​Generates ​the cell value in the Auxiliary Excel file, based on the value indicated by the parameters RowNum, ColNum, ValueCell. The parameter "Use first line as column name" doesn'​t work with this function.+  * **setTableValue():​** ​generates ​the cell value in the Auxiliary Excel file, based on the value indicated by the parameters RowNum, ColNum, ValueCell. The parameter "Use first line as column name" doesn'​t work with this function.
  
-  * **vTableLookUp() :** Returns ​a TastDataString,​ that contains the values of the indicated column to retrieve, for every row that matches the condition. The imput parameters here are ColToSearch,​ ValueToSearch y ColToRetrieve.+  * **vTableLookUp() :** returns ​a TastDataString,​ that contains the values of the indicated column to retrieve, for every row that matches the condition. The imput parameters here are ColToSearch,​ ValueToSearch y ColToRetrieve.
  
-  * **vTableLookUpArray():​** ​Returns ​a TastRowTableData,​ which is a list of values located on the indicated column to retrieve, for every row that matches the condition. The imput parameters here are ColToSearch,​ ValueToSearch y ColToRetrieve.+  * **vTableLookUpArray():​** ​returns ​a TastRowTableData,​ which is a list of values located on the indicated column to retrieve, for every row that matches the condition. The imput parameters here are ColToSearch,​ ValueToSearch y ColToRetrieve.
  
excel_file_adaptor.1700472554.txt.gz · Last modified: 2023/11/20 09:29 by montse