on ‎2022 Mar 22 1:06 PM
Hello experts,
How do we run SQL query on excel workbook in iRPA cloud studio.
Tried imitating this blog post which is meant for desktop studio with a little modification in code.
The following error is thrown. "ActiveXObject is not defined".
Please suggest if there is any solution.
var cn = new ActiveXObject("ADODB.Connection");
var strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source = 'C:\\Users\\Administrator\\Downloads\\abc.xlsx';Extended Properties='Excel 12.0;HDR=Yes'";
cn.Open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
var SQL = "select * from [Sheet1$] where [Group Indicator] is not null";
rs.Open(SQL, cn);
var index=0;
while(rs.EOF != true){
rs.MoveNext();
index++;
}
rs.Close();
cn.Close();
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hello Bhushan,
I am using Execute Macro feature in IRPA Excel SDK. And I keep all macros in a separated excel file. It allows me having all programming code separated.
Regards,
Jan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.