LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default ADO connection to a protected workbook?

I am making an ADO connection to macro enabled workbooks
(i.e, workbooks of type *.xlsm). Here is my connection string example:

"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\data.xlsm;
Extended Properties=""Excel 12.0 Macro;HDR=NO;IMEX=1"""

So far, I have been able to make connections to very simple and basic
Excel 2007 macro files. However, when I try connecting to a workbook
that is password protected (with all sheets being password protected as
well),
then I CANNOT make a connection. I get an error message that reads
something like "Table is not in the expected format".

So, my question is, is ADO useless if the workbook is password protected?
This workbook also contains hidden sheets, so I wonder if that's the
problem?
What sort of things will prevent an ADO connection? I know I do have the
correct connection string, so something else must be wrong.

Thank you!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use workbook name in Connection James_G Excel Programming 3 February 5th 08 03:14 AM
using ado db connection in different workbook RB Smissaert Excel Programming 14 November 5th 06 11:36 AM
Group, Outline, Protected Worksheets and Protected Workbook BEEJAY Excel Programming 0 February 13th 06 08:40 PM
Running a macro to protect a workbook on a already protected workbook UNprotects the workbook ?? WimR Excel Programming 9 July 25th 05 12:44 PM
Open a password protected excel workbook from second workbook to fetch data using dynamic connection kaustav choudhury Excel Programming 2 April 3rd 04 06:18 AM


All times are GMT +1. The time now is 03:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"