Create Query from Password Protected Workbook

JoyC

Board Regular
Joined
Aug 28, 2009
Messages
91
Could anyone tell me if there is a way of querying a password protected workbook please?

I am trying to import data from a password protected workbook using the Excel query method, however the source is password protected and owing to the sensitivity of the data I cannot leave the workbook unprotected whilst importing the data.

I am not averse to using code, as I have already established a way of refreshing this query using VBA, but cannot work out how I can create the query in the first instance.

Thank you <!-- / message --><!-- BEGIN TEMPLATE: ad_showthread_firstpost_sig --><!-- END TEMPLATE: ad_showthread_firstpost_sig -->
 

Some videos you may like

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,672
Office Version
  1. 2016
Platform
  1. Windows
Look to record a macro to create the intial query as it then gives you the code. As long as you have the password etc to contect to your source then you can include it in the code, once it establishes the link and brings in the data you can look to break the link so the source data is disconnected.
 

Watch MrExcel Video

Forum statistics

Threads
1,109,522
Messages
5,529,328
Members
409,863
Latest member
stacy09
Top