BatMan22 Posted November 30, 2023 Share Posted November 30, 2023 Global $sFilename = @ScriptDir & "C:\Users\Username\Desktop\File.xlsx" Global $sConnectionString = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source=' & $sFilename & ';Extended Properties="Excel 12.0 Xml;HDR=YES"' $oConnection.Open($sConnectionString) ; Open the connection Hi Guys, I'm trying to connect to a CLOSED excel file with the OLEDB libraries and am getting an error when I attempt to open the file, I'm using the example as a reference but it seems like it's original version + this version doesn't work. Does it require admin perhaps (I don't have admin on this PC)? Opening the file doesn't help either. I get the error below: "C:\Users\Username\Programming\ExcelReadWorking - Copy.au3" (34) : ==> The requested action with this object has failed.: $oConnection.Open($sConnectionString) $oConnection^ ERROR Link to comment Share on other sites More sharing options...
BatMan22 Posted November 30, 2023 Author Share Posted November 30, 2023 Can someone delete this string.. I didn't see the @scriptdir that needs to be removed. I am dumb. Link to comment Share on other sites More sharing options...
argumentum Posted November 30, 2023 Share Posted November 30, 2023 10 minutes ago, BatMan22 said: I am dumb. HEY !, that's my phrase ! Andreik 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
argumentum Posted November 30, 2023 Share Posted November 30, 2023 33 minutes ago, BatMan22 said: Properties="Excel 12.0 Xml; what version of Office is there in the PC ? Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Andreik Posted November 30, 2023 Share Posted November 30, 2023 4 minutes ago, argumentum said: HEY !, that's my phrase ! Everyone knows that you are trolling us when you say that. argumentum 1 When the words fail... music speaks. Link to comment Share on other sites More sharing options...
robertocm Posted December 4, 2023 Share Posted December 4, 2023 Some ideas to check: https://www.autoitscript.com/forum/topic/209361-read-xlsx-with-ado-anomaly/?do=findComment&comment=1511561 https://www.autoitscript.com/forum/topic/209361-read-xlsx-with-ado-anomaly/?do=findComment&comment=1511588 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now