The ajReadWorkbook function imports the content of an Excel file into a defined area in the Excel worksheet. It is mainly used for loading data from an Excel file for processing.
ajReadWorkbook(source_workbook_path, data_range, [convert_to_text], [run_condition], [run_by_function_point_only])
|Specify the path of the file to be read. |
Remark: The function only supports source workbook in xlsx and xlsm format and it cannot not be the same as current workbook.
|Specify the range of data to read in the source workbook in [sheet]!range_address format. |
For example, "sheet1!A2:F10".
|If it equals TRUE, the return result will be converted to string values. |
If it equals FALSE, the return result will preserve the original data type of each cell.
If you do not specify anything, the default value will always be FALSE.
The function will run when the value is TRUE. Otherwise will not run.If you do not specify anything, the default value will always be TRUE.
|If it equals FALSE, the function can be executed through ‘Excel Calculation’ (can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Run Function Point. |
If it equals TRUE, the function can be executed with Run Function Point (AlchemyJ toolbar \ Run Function Point) only.If you do not specify anything, the default value will always be TRUE.
The function will return:
1) Content type: Contents of specified data range in the selected file
2) Method: Cell array
Here is an Excel file to be read by ajReadWorkbook function. Data from A1 to E6 is to be read to the AlchemyJ workbook.
Records in the source Excel are loaded to the selected area.