Jump to content

OLEDB Failure...


BatMan22
 Share

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...