Developers community number 1 connection string reference

Problem when the Excel file name is changing or unknown

Posted 2010-05-04 18:43
by Richard Harves
in the Excel Forum
I'm looking over the Excel examples and see a problem: what if I don't know the exact name of the Excel file I'm trying to open? All of the examples need a full name either in the Dbq or the Data Source properties. In my case the file is different every day.

Any ideas if this is possible?
Reply 2010-05-04 18:44
by Max Wikström
in the Excel Forum
No I cant see how this would be possible. You must know the name of the file you are trying to open. Sorry.
Let me know if you find out a work around.

Maybe you could try to enumerate the files in the folder if you know the foldername and then check the file date or something. Then parse that filename into the connection string.
Good luck!
Copyright © 2012 ConnectionStrings.com   |   All Rights Reserved   |   Powered by CSAS   |   Send feedback, articles, requests and more connection strings here.