First create or attach an existing spreadsheet to Rapise test.
Creating a New Spreadsheet
To create a spreadsheet right click the test node in the File tree and choose Create > Spreadsheet.
Specify spreadsheet name, format and click Create.
Three things will happen:
1. The spreadsheet will be created and opened for editing
2. The spreadsheet will appear in the File tree
2. Spreadsheet object will appear in the Object tree
To finish with the setup specify column names in the spreadsheet
Adding an Existing Spreadsheet
To add an existing spreadsheet right click the test node in the File tree and choose Add File(s).
Locate the spreadsheet and click Open.
The spreadsheet will appear in the File tree
Right click it and choose Create Data Object.
Spreadsheet object will appear in the Object tree
To open the spreadsheet for editing double click it in the File tree.
The spreadsheet object is bound to the Excel file and attaches to it automatically during playback.
Now we can use spreadsheet object actions to write data.
Note: columnId is an optional parameter of the SetCell action and won't be generated automatically when you select the action. You can manually choose it on the next line in ParamName column.
// Adding new row to the spreadsheet
// Reading some data into LastResult variable, this part will be different in your test,
// this is where you obtain data vaules to output
// Writing contents of LastResult variable to the last row of the spreadsheet and column AccountID
// Writing time to the last row of the spreadsheet and column Timestamp
SeS('Data').SetCell(new Date(), "Timestamp");
// Do not forget to save the spreadsheet at the end