ajRenderFileWithJSON function
Available since AlchemyJ v4.3 AlchemyJ Enterprise Edition
Description
The ajRenderFileWithJSON function render file by providing JSON Data and Freemarket template file.
Syntax
ajRenderFileWithJSON(json_data,template_path,file_location,[replace_file], [options],[run_condition],[run_by_function_point_only])
Argument Name | Argument Type | Description |
---|---|---|
json_data (required) | Variant | To specify is the range of cells that contains the JSON string. The range of cells can span across multiple rows and columns. The cell values will be concatenated into one string from left to right and top to bottom. |
template_path (required) | String | To specify FTL template location |
file_location (required) | String | To specify the path of the file to be written. |
replace_file (optional) | Boolean | TRUE would replace the file if it exists. FALSE would return #VALUE! If the file exists. |
options (optional) | Variant | Define a list of options that the FTL / PDF library supports. |
run_condition (optional) | Boolean | The function will run when the value is TRUE. Otherwise will not run. The default value is TRUE. |
run_by_function_point_only (optional) | Boolean | If it equals FALSE, the function can be executed through ‘Excel Calculation’ (can be either Automatic or Manual, Calculate Now or Calculate Sheet) or Preview Function Point. If it equals TRUE, the function can be executed with Preview Function Point (AlchemyJ ribbon \ Preview Function Point) only. The default value is TRUE. |
The function will return:
1) Return Value: TRUE, #VALUE!
2) Return Type: Single Value
Error Scenarios
It will return #VALUE! when missing any required parameter or mismatch parameter type. Besides, system will raise error for below scenario(s).
Error Scenarios |
---|
Data cannot be empty. |
Template path cannot be empty. |
File location cannot be empty. |