Editing parameters of a connection file, but "edit query" is grayed out

jfz2004
jfz2004 used Ask the Experts™
on
I try to edit the query in a connect file in Excel, but the "Edit" button grayed out.
How to activate this button?

Thanks,

Jennifer
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Try this:
Right click on any cell of the Query output and go to Data > External Data Properties.  Click on the Connection Properties button and then your query will appear under Connection string of the Definition tab

Or this:
create a new query starting with Data tab | Get External Data group | From Other Sources dropdown > From Microsoft Query

Author

Commented:
Thank you!

I tried. And I can get the Connection string of the Definition tab without any problem.
The only problem is the "Edit" button on the definition tab is grayed out. So still need help.

Author

Commented:
I tried to create a new data source and chose SQL Server Login. But the drop-down list dores not have the server name I want to connect. Yet I can use SSMS to connect to the SQL Server.
Please help. Thanks a lot.
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Commented:
The SQL server name may not appear if the SQL browser service is not running. Try typing the name of the server (if it is the default instance on the server that you want to connect to).

I think you can use the 'edit' button to edit the query for MS Query type connections. i.e. those that you have stared using the 'From other data sources/Microsoft Query' option. Such queries show 'Database query' at the top of the definition tab. You can still query SQL Server data via this option.

If you choose the 'other data sources/SQL Server' option, you have to edit the query in the 'command text' box below the connection string box. You can't edit the query using MS query. that is why the 'Edit' button is disabled.

Author

Commented:
Thanks a lot. Let me try what you stated here.
Jennifer

Author

Commented:
here is what I did:

1. In a blank Excel, I click "From Other Sources";
2. Then choose "From Microsoft Query"
3. In "Choose Data Source" box, I choose the right database;
4. Then choose the table and columns via MS Query.
5. And it worked. I see the EDIT button shown.

Thanks a lot.

Jennifer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial