Hi,
I want to connect Excel as DB by changing the file name of excel every time. Every time when I try to make some changes in new excel file, the changes are made in the old excel file. I mean DB connection establishing the file used while creating the DB connection is considered and modified.
So the connection string was previously like this,
When I wanted to change the filename dynamically, I changed the connection string by passing the string variable (which holds the filename) as follows::
Hello @Jeyalakshmi_KS
Your connection is Looking Good
If You need to loop the files in the specific Folder, Use For Each file in the Folder activity and Assign, FilePath= Currentfile.Fullname Or if you facing any issues, share the error with screenshots. Dsn=April2023_ExcelDB;dbq=“+FilePath+”;defaultdir=“+DefaultdirPath+”;driverid=1046;fil=excel 12.0;maxbuffersize=2048;pagetimeout=5
I am not facing any errors. But when I want to update the new file that I am passing thru input variable, it’s updating only the old file which was there during Excel-DB connection establishment.
Like if there are two files such as A and B, the changes made thru query are done only on file A but not on new file B.
No, I do not want to loop the files. I am passing the file in a variable, I want the ‘Update Query’ to be processed in the file which I am passing dynamically.
Instead it is processing in the file which is selected in Connection wizard during establishing DB connection.
Thanks, will look into this n try the same. The issue it’s updating only the old file which was there during Excel-DB connection establishment instead of the file passed in the variable.
Like if there are two files such as A and B, the changes made thru query are done only on file A but not on new file B.
Should I pass the whole thing in a string and print? Because when I tried printing the variable’filename’, it prints the new file name correctly every time. Issue is DSN part only I guess but not sure how to resolve it
Driver ID comes as default when I configured connection.I dint give it manually.
Have attached the xaml file here. Can u please have a look at it? Thanks for your time.