Invalid Connection String Attribute FirstRowHasNames
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x7d0 Thread 0xde8 DBC 0x17f574e4 Excel’.
ERROR [01S00] [Microsoft][ODBC Excel Driver]Invalid connection string attribute FirstRowHasNames
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver’s SQLSetConnectAttr failed
ERROR [HY000] [Microsoft][ODBC Excel Driver]General error Unable to open registry key Temporary (volatile) Ace DSN for process 0x7d0 Thread 0xde8 DBC 0x17f574e4 Excel’.
If, however, I first open the Excel file and just save it, I can then go to SmartConnect and validate the connection. Again, all I did was open the Excel file and save.
What do I need to do to eliminate this step?
That message means the Microsoft ODBC driver cannot read the file due to it not being there or being locked. Not sure how SSRS creates the Excel file during export but it may not have released the lock by the time you try to open it with the Microsoft ODBC driver.
Lorren
Thanks, Lorren. That’s similar to the answer I got from David when I sent in a support request. See below:
It’s a problem with the file.
SmartConnect doesn’t have any special way of reading the file, it’s using the Excel ODBC drivers to read the data from it. So if the file doesn’t work when you first look at it with SmartConnect, I’m guessing you would get the same error in any program that is making an ODBC connection to the file.
I took your file and put it on my machine and pointed SmartConnect at it to see what I would get. I got the same error. If I opened in Excel and saved it, it worked fine.
The Excel XLSX file format is actually a zip file. If you rename the extension to .zip and open the zip file, you will see an XML file along with 3 folders. The XML file is named [Content_Types].xml and then there are 3 folders that hold the data.
Open the XML file in Internet Explorer and compare the original one to the one that gets created when you open the same file and save it. When you open the file and save it, Excel adds additional attributes to the file. (See screenshot of what it looks like in my system)
So however the file is getting generated, it’s not getting created correctly. If you are creating it using SSMS, you could contact Microsoft and tell them that the XLSX file generated from SSMS doesn’t have the correct attributes to read the data in the file using Excel ODBC drivers.
Tim,
I would recommend emailing support@eonesolutions.com one of these Excel documents that aren’t working. We would like to see what the document looks like before you open and save it.