Robotic Process Automation (RPA)

 View Only
  • 1.  Extract row from excel sheet

    Posted Fri April 29, 2022 04:31 AM

    Hi Team,

    I am able to extract the excel file and iterate over the rows but I am unsure how to copy/collect the rows conditionally. I want to copy the row to a collection If possible so that I can write these collected rows to a new excel file.  

    And also can we have more than one expression in the if statement

    while --left "${vAllOrdersReportExcelTableRows}" --operator "Greater_Than_Equal_To" --right "${vAllOrdersReportRecordCounter}"
            mapTableRow --dataTable ${vAllOrdersReportExcelTable} --row ${vAllOrdersReportRecordCounter} --mappings "number=5=${vAllOrdersReportTableColumnOrderNumber},number=6=${vAllOrdersReportTableCOLMT},number=7=${vAllOrdersReportTableColumn_MDL},number=21=${vAllOrdersReportTableColumn_PSSD}"
            if --left "${vAllOrdersReportTableColumnOrderNumber}" --operator "Begins_With" --right "${vTextYT}" --negate
                excelSet --value "${vAllOrdersReportTableColumnOrderNumber}" --file ${vNewExcel} --getfirstsheet  --row 1 --column 1
                //add --collection "${vRequiredTableRows}" --value "${vAllOrdersReportTableColumnOrderNumber}"
            endIf
            incrementVar --number ${vAllOrdersReportRecordCounter}
        endWhile



    ------------------------------
    KARTHIK GUTTAPUDI
    ------------------------------


  • 2.  RE: Extract row from excel sheet

    Posted Fri May 06, 2022 09:36 AM
    Hi KARTHIK GUTTAPUDI,

    What did I do was, I created a list for each column, so when you iterate over the row, you also need to iterate over all the columns, and for each column I added the cell to a specific list and the index of the item in the list will follow the row number.

    ------------------------------
    Bruno Raphael Marques de Santana
    ------------------------------



  • 3.  RE: Extract row from excel sheet

    Posted Fri May 06, 2022 11:37 PM
    Hi Bruno Raphael Marques de Santana

    Thank you for looking into it, I will give it a try.


    ------------------------------
    KARTHIK GUTTAPUDI
    ------------------------------



  • 4.  RE: Extract row from excel sheet

    Posted Mon May 09, 2022 01:07 AM
    Hello KARTHIK GUTTAPUDI,

    I am using SQL commands (SELECT) directly on excel file to solve your use case. I have experience in another RPA tool, but I think IBM RPA will do the same. Look into SQL Commands actions and connect with MS Access driver (Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\ExcelFile.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";) If you will try please let me know it works here too. Thank you.
    Jiri


    ------------------------------
    Jiří Mráz
    ------------------------------



  • 5.  RE: Extract row from excel sheet

    Posted Wed May 11, 2022 03:08 AM
    Hello Jiří Mráz

    Thank you for looking into it, my requirements have changed a bit so might be able to try this now. 


    ------------------------------
    KARTHIK GUTTAPUDI
    ------------------------------



  • 6.  RE: Extract row from excel sheet

    Posted Wed May 25, 2022 12:21 PM
    Edited by Vinicius Marques Wed May 25, 2022 12:21 PM
    Hi Jiri,

    How do you set up the environment in order to make the MS Access driver available? Any tips on how to use it with IBM RPA?
    I tried with the following code, but couldn't manage to get it working:
    odbcConnect --connectionstring "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Temp\\teste.xlsx;Extended Properties=\"Excel 12.0 Xml;HDR=YES\";"​

    Error message:
    System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][ODBC Driver Manager] Datasource name not found and no default driver specified

    ------------------------------
    Vinicius Marques
    ------------------------------



  • 7.  RE: Extract row from excel sheet

    Posted Thu May 26, 2022 04:17 AM
    Hello Vinicius,

    I do not have RPA Studio available at the moment to be able to check, I use that aproach with Winautomation. But I think it should be similar. First of all you need to have the drives installed on the machine, please ref to https://www.microsoft.com/en-us/download/details.aspx?id=13255. It is a bit tricky with 32/64 bit versions because of Windows and Office 32/64 combination. The best way I found is to install both drivers, but the second one you need to push with quiet/passive mode like this C:\Temp>AccessDatabaseEngine_X64.exe /quiet

    ------------------------------
    Jiří Mráz
    ------------------------------