Forum Discussion

Mallikarjun's avatar
17 years ago

Creating/Updating excel sheets with groovy

Hi All,

        How do i create/update an excel sheet from within a groovy without using Datasink/Datasource steps of SoapUI-Pro?

        There are some limitations of using datasink/source steps with excel as an option.

        My requirement is as follows:
            My project creates Billing Account Details. I need the same excel sheet to be updated every time i run different automated test cases in my Soapui-Pro. Alos, one testcase may generate one BAN(Billing Acc Num) and the other may generate 2-3 BANs. But this is not possible as we have to manually configure the starting row in datasink excel configuration.
        But i hope there's a work around for this if we use groovy to do the same.
        Please let me know how this can be done.

Regards
Mallik

1 Reply

  • M_McDonald's avatar
    M_McDonald
    Super Contributor
    You could also create a Data Source step using the spreadsheet and loop until you locate an empty row. Then set a property with that value and use property expansion in the "Start At Cell" field in the Data Sink.

    This might be a nice enhancement for the Data Sink step - a "Start At First Empty Row" setting.