persons
.persons
to the Collection.people.json
:people.json
.persons
Request variable during a Request. You will revise the Collection ID after you import the Process for this example.Process - Excel Spreadsheet Records to Collection Records Example.json
:Process - Excel Spreadsheet Records to Collection Records Example.json
.Process File
Script Task element triggers. Type into its Run script setting to filter users and/or groups that display in that setting's drop-down menu. Ensure that the selected user or group members have appropriate permissions to run Scripts.Save to Collection
Script Task element triggers. Type into its Run script setting to filter users and/or groups that display in that setting's drop-down menu. Ensure that the selected user or group members have appropriate permissions to run Scripts.Save to Collection
Script Task element that runs a Script to write the Excel spreadsheet records stored in that Request's JSON data model in the persons Request variable.
Save to Collection
Script runs.{
"recordsVariableName": "persons",
"collectionId": 18
}
Read Excel File to JSON
Script that run when the Process File Script Task element triggers? Locate the Script Configuration setting for the Process File Script Task element as described above, and then change the JSON key name recordsVariableName
's value to the Request variable name you want:
{ "fileVariableName": "recordsFile", "recordsVariableName": "persons" }
recordsVariableName
's value for the Save to Collection
Script's configuration to the same value.PHP with PHPSpreadsheet package
.RUN apt-get update -y \
&& apt-get install -y \
libpng-dev \
&& apt-get clean -y \
&& docker-php-ext-install gd zip \
&& docker-php-ext-enable gd zip
RUN composer require phpoffice/phpspreadsheet
Read Excel File to JSON
. The Edit Configuration page displays.
Save Records to Collection
, by default configures to use the Script Executor named PHP Executor
when it is imported.Excel Spreadsheet Records to Collection Records Example
.Read Excel File to JSON
Script read the records from the Excel spreadsheet, stored them into the persons
Request variable, and now displays their contents in the Review Upload Task.