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
------------------------------
Original Message:
Sent: Wed May 25, 2022 12:21 PM
From: Vinicius Marques
Subject: Extract row from excel sheet
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
Original Message:
Sent: Mon May 09, 2022 01:07 AM
From: Jiří Mráz
Subject: Extract row from excel sheet
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
Original Message:
Sent: Fri April 29, 2022 04:31 AM
From: KARTHIK GUTTAPUDI
Subject: Extract row from excel sheet
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
------------------------------