Removing Multiple Data Connections
If you have a large number of lingering data connections in your workbook, removing them individually can be tedious. A recommended solution is to use VBA scripts to remove all connections at once. You can find scripts online, such as one shared on Snipplr, which can be run via the Developer tab in Excel [1:1]. Alternatively, using the "Queries & Connections" panel allows for manual deletion, but it requires deleting each connection one by one
[1:2].
Speeding Up Slow Spreadsheets with Data Connections
Spreadsheets with multiple data connections can slow down significantly, especially when pulling data from numerous web pages. To manage this, consider disabling automatic refreshing and manually refreshing data only when necessary [2:2]. Using macros to control refresh operations can also help optimize performance by running updates only when triggered
[2:1].
Global Connection Setup
For managing multiple queries that require the same data source, setting up a global connection can streamline the process. This involves creating a connection using Excel's "Get Data" feature, which can then be used across different queries [3:1]. This approach reduces the need to update individual connection strings manually.
Auditing Outbound Data Connections
To audit outbound data connections, particularly when you have multiple workbooks referencing a single source, maintaining a consolidated list can be challenging. While Excel does not inherently provide a way to view all dependent workbooks, organizing your files systematically and documenting references manually might be necessary [4].
Troubleshooting Refresh Issues
If Excel becomes unresponsive during a "Refresh All" operation involving data connections, consider refreshing connections individually or using Power Query for data management [5:1]. Ensuring you're using the 64-bit version of Excel can also improve performance, as the 32-bit version may struggle with larger datasets
[5:2].
Hi all, been searching here and elsewhere for a solution for this and nothing I've seen yet seems to work.
I have an Excel 365 workbook that I routinely use the text import wizard to bring in some CSV formatted data. I've recently discovered that there are over 300 'data connections' lingering in the file, pointing to CSVs that I have imported over the past few months, dealt with the data, and long since discarded it. I would like to remove the connections, but there doesn't seem to be a way to multi-select the connections in the 'Queries & Connections' pane. I don't want to right-click, delete, say yes to the confirmation, over 300 times.
I found this answer in a previous post, but after removing connections.xml, when I tried to open the updated file, Excel tried to 'recover' it about 10 times and then refused to open it saying it was corrupt. (I am fairly confident I did not screw up the 'zip' format of the file, the only thing I did was delete connections.xml.)
I also saw another answer on another discussion forum suggesting to use some vbscript in a macro, but I have absolutely no knowledge on how to build and execute macros in Excel, it's just one component I've never needed to learn.
Is there a way to delete these connections without deleting them one by one over the course of several hours?
Thanks!
You should be able to go to the Data tab and select Existing Connections under Get & Transform Data and delete en masse? If they are actual queries, you can open up the query editor and delete all of them at once.
There doesn't appear to be a delete function in "Existing Connections", and you can't select more than one connection at a time. I've tried right-clicking on any of them, holding down Shift and clicking multiple entries (just moves the selection highlight from one to the other), etc. Screenshot here.
In 'Queries & Connections', a side panel pops out with similar details; you can right-click and choose delete, but only one at a time, and multi-selecting them is, again, not possible. Screenshot here.
Launching the Power Query Editor shows a sceren with Queries (0) in the left side panel and no data.
This is Excel 365 enterprise, Version 2208 (Build 15601.20578).
Try this VBA if you're able to run it:
https://snipplr.com/view/45897/remove-all-data-connections-from-excel-workbook
Developer tab - Macros - Create new macros. Paste that in and run it. You can then save it as a macro free workbook as I know a lot of workplaces won't let you store.
Try selecting data on the ribbon, then in the queries and connections section there should be a button that says "edit links", click on the first link, then press and hold the shift button and scroll down to the bottom of the list, or hit Ctrl-A and see if it selects.
Once they are all selected, just hit break links, and it should do what you need.
Unfortunately Edit Links was greyed out. The macro Igor provided worked, though, thanks.
Go to "Data" ribbon,
"Queries & Connections" (a side panel will pop up),
right click any of the queries and click "edit" (a query editor window will pop up),
then cilck the first query on the list on the left,
scroll to the bottom and shift click the bottom query on the list,
right click and "delete",
close window and confirm "keep" changes.
This is the solution.
Thank you.
/u/Jay911 - Your post was submitted successfully.
Solution Verified
to close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
I have a spreadsheet that has 3 tables pulling data from 815 web pages each.
This data needs to update weekly so I don’t want to convert it to text or anything like that, but is there a way to freeze data for the time being to speed the spread sheet up and then turn it back on weekly to update?
There’s about 20,000 individual rows across 4 tables, so could it just be that my computer/internet is too slow to run it efficiently.
Does anyone have any tips to speed it up?
Are you pulling the data using vba or the net query? If you're using the built in query, create a macro enabled workbook and record a macro of the initial setup, then assign the code to a button so it only runs when pressed.
The built in query.
That might work but I’ve disabled all the auto-refreshing and it only refreshes when I check the refresh all button in the data tab. Shouldn’t this do the same thing?
We've switched to a cloud setup and the data connections to our software need to be updated/changed.
Queries and Connections>Connection Properties>Definition>Connection String
ConnectionString is where I change the to the new data connection, for each query, some have up to 10. Is there a way to "hard code" the connection in excel so it is recognized by all queries? Like a global way instead of each one.
TIA
/u/JohnnyBrillcream - Your post was submitted successfully.
Solution Verified
to close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
In Excel, you can set up a global connection to a data source that can be used by multiple queries. To do this, you typically create a connection using the "Get Data" feature and then use that connection as the source for multiple queries. Here's a general outline of the steps:
Create a Global Connection:
Create Queries Using the Global Connection:
Edit the Global Connection:
By using a global connection, you can maintain a single point of control for your data source settings, which simplifies the process of managing connections in Excel. However, you will still need to update the global connection when your cloud setup changes, but this change will apply to all queries using that connection.
I have source workbook "Database.xlsx" and destination workbook "Report.xlsx"
"Report" imports a table from "Database". Currently this is done using the Connections feature.
From within "Database" Is there a way to view which workbooks are using it as a source?
If it helps, the purpose is that I plan to create copies of "Report" with different filenames for various projects and I would like to have a consolidated list of projects that reference this data that I don't have to manually maintain.
I am open to other solutions <3
/u/prtzle - Your post was submitted successfully.
Solution Verified
to close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Not sure if this sort of post is allowed here.
I've had this issue for the past few months. I have four CSV files that are linked to a master sheet via Data Connections. There are two PivotTables in the master sheet. When I hit refresh all, Excel stops and I get the "Excel is not responding" and no amount of waiting finishes the pull.
However, if I go into Data Connections, select all the connections and refresh them there, it works. Then I manually refresh the PivotTables. I tried a work around by creating a macro that selects all the connections and refreshes them (like a new Refresh All button), but that also hangs.
This is my work laptop, and I'm on Office 2016. I've tried repairing Office twice, rebuilding the connections, etc. This also happens on other workbooks with external data connections (XLSX, CSV, etc.).
If I take these files and build the exact same connections and try it on my home PC, it works. I have Office 2016 Pro there as well.
Has anyone else ran into this?
Are you on 32 or 64 bit version? I had this problem using 32
64 bit.
Have you tried to use power query to do this
Hello everybody!
​
I have developed a tool within excel that consolidates different data from our Oracle DB and several excel files and structures them into a corresponding format (report) with Power Query, Power Pivot and Dax.
Now, this tool will be used every morning for our discussion at our meeting.
So, I am looking for different ways and update/ refresh the data connections automatically.
I know, there is already the option to update des excel file at opening or for every x minutes.
But actually, I am looking for a more elegant way/alternatives.
How do you manage that?
Unfortunately, PowerBI is not an option.
Maybe a 24/7 computer, that has the excel tool always open and that updated the file every 24 hours?
Is there any way within Sharepoint? The tool is used in SharePoint and excel online.
​
I am happy for every replay!
I don't see why you wouldn't use the simple option as you already described of an on open event such as:
Private Sub Workbook_Open()
ActiveWorkbook.RefreshAll
End Sub
You state a more elegant way but really this is all there is to it. It should take only a few seconds and it's finished.
Well
Hi,
I work outside of IT / BI in my company so I don’t have access to databases etc.
I have been tasked with building some business wide reports using data from systems that will be exported into excel / csv and then uploaded into powerbi and cleansed etc before building and sharing some dashboards / reports.
Does anyone have any experience with this sort of workflow - if so can you give any advice on best practices and things to be aware of?
Thanks
If you are stuck in this situation, do everything you can to get cleanest data as you can.
If the excel/ csv files are being emailed to you, you could use powerautomate to save the files into sharepoint/cloud. Then do as much cleaning/ merging in power querry.
Yep highly common in every big or small company I’ve come across.
Keep files in SharePoint
Use from web to connect to single files
For consolidating multiple matching files Use from SharePoint folder and the File.Contents trick to speed refresh
Videos 1 and 3 in this playlist Power Query and SharePoint / OneDrive https://www.youtube.com/playlist?list=PLlHDyf8d156W_I_ycA7kbfLKAej54p9Un
I think this is exactly what I’m looking for thank you.
In this example, where would you be saving your powerbi desktop doc and where / how would it be shared to the end user - would you publish to a workspace or sharepoint?
If it helps I have a powerbi pro account
Might be some silly questions there but just want to get the most info I can before getting stuck in
Just keep in mind that if when you setup connections to SharePoint it’s using your credentials to login. You need to refresh them in power BI every 90 days or the reports will stop refreshing.
My workplace is currently working towards power BI and getting a login token setup to use a gateway instead of individual credentials and a central SharePoint. So if you can get your IT to setup a login token to a particular SharePoint it will ensure your refresh always goes through without your intervention,
Editing to add: this is done in the semantic model once it’s published to the Power BI service site.
Desktop files can just be saved wherever is needed ( like key Word or Excel files, so a sensible folder in SharePoint that only the report creators have access to )
Reports are shared to end users via the Power BI service ( publish to workspace ). You require pro to share and users require pro to view.
For an intro and info on licence then I’ve a bunch of videos here
Power BI https://www.youtube.com/playlist?list=PLlHDyf8d156VDobBIk13o4mZLk19DbV81
Schema changes are going to drive you nuts. And they will happen
Edit: if this is not a sheet a department is using as a psuedo database just pull from a folder (directory it's dumping to) and then you'll need some process to clear the contents from the folder each day or identify/ filter incoming records (if this process occurs daily)
Can you tell me more about this? If the data from the system has the same columns each time it needs refreshing why would the schema change?
Business is never static. Its a constantly evolving organism, your sales system wont be the same for the next 2 decades. Your ordering or vendor system won't be the same.
Things change, including the source data. You have to accept that you will have to be able to handle change in your model, and you should aim for that to be as smooth as possible.
It won't. Just my experience working with end users for these small departmental projects is there is usually one person that does some rearranging of the sheet and it'll break your ingest. If you are confident the sheet is locked, no issues in theory.
things to point out:
Use a dataflow to ingest and then reuse the dataflow for multiple reports. When and if the schema breaks, just fix it in one place
Xlsx is a slow source to pull from csv actually much faster
Ideally you'd ingest the sheet to a sink, even something simple like dataverse and then pull from there
Best practice for excelbased reports: Don’t
Option 2: talk to your data team and ask them to prepare datasets for you to connect to.
Get your business to push to build a data warehouse. Don’t use excel.
Looking to automate the transfer of Data between Power BI to google sheets. I’ve started by getting the data into an Excel sheet and now I just need to transfer from Excel to Google sheets. I’ve seen a few ways via addons/extension but I don’t quite trust them.
I’m relatively new to excel and the data needs to remain secured. 🤠
Sheets supports opening excel files, just be aware that sheets and excel have different syntax for some formulas. Sheets to Excel also isn't perfect, but excel to Sheets should be no issue.
/u/No-Performer-4174 - Your post was submitted successfully.
Solution Verified
to close the thread.Failing to follow these steps may result in your post being removed without warning.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
save the excel sheet to your google drive and open it with sheets?
i do this, often.
I an working on creating an interdepartmental ‘workflow’ inside of an excel file. I need it to link to a replicated database so we can query data and then feed that data into a separate sheet. The data link also needs to be dynamic.
My concern is that any changes in the excel file will also change the access database.
What are my options? What would you do?
Quick summary of what I need to do:
ETA: Really any advice on how to handle the entire process is welcome. I am fairly new to these types of projects. I learn quick but if you have a protip, Im all ears.
>My concern is that any changes in the excel file will also change the access database
no it won't, that's not how it works.
The difficulty with answering so many of the questions I see on technical Reddit subs is that we don't have a requirements document, don't know the solution's architecture; so it's hard to say anything authoritatively about how the solution will work.
It's true that pulling data from a database into Excel using native Excel Data Connections and working with that data in a Workbook can't cause changes in the Excel file to ripple back to the database.
But we don't know whether there are VBA / ADODB code blocks in the Workbook that *do* flow back.
There is a specification in the original post stating "The next step will be executed outside of the wb. But it will reflect in the access database immediately so the wb needs to accurately report that change when refreshed"
My point, I guess, is that there is *some* update to the database, but it's not performed in the front end Excel file.
Unrelated, it's always made me crazy that Access is called Access. :D
It confuses things, IMO -- "I want to access the data"; "I want to access the Access data"
The Excel file reads the data, that is to say Access executes a query and returns the result to Excel,
To then have a mechanism to update that data from Excel to the Access database, you would require a trigger mechanism in Excel to execute and UPDATE
SQL request to Access to update that database based on the change. That trigger is generally a VBA onchange
event to generate the UPDATE
SQL to pass back up through the connection.
Nothing flows back without explicit coding to do so.
Yes - the database is replicated from a software system that is very clunky and is truly only a data entry system. The work outside of the sheet is done inside of that system and a T/F value is generated when that stage is complete.
This thread is extremely helpful though. Thank you both for being so thorough!
This sounds like a solid project! To avoid accidental changes to your Access database, try connecting Excel as read-only using Power Query or linked tables — that way, it only pulls data in without updating anything unless you specifically allow it.
For updates, use a separate sheet or form, so changes are intentional and easier to manage. You can also automate emails using VBA and just make sure to refresh your data regularly to reflect any changes in Access.
Breaking the process into clear steps across separate sheets will make it much easier for your team to follow and reduce confusion. You’re definitely on the right track!
Show your #2 details in the email so they don't have to enter the WB to view, then have your #3 be a different WB that Access reads from.
The whole idea is to eliminate the other Department’s dependence on emails. I forgot to add that #3 will also generate an automated email using data from the workbook as well
I know it seems counterintuitive but this will mostly exist as an organizational system for now and will be completely reconfigured a year from now when they give us the green-light on power automate.
If I read correctly, you do not want work done in the Excel file to feed into the database.
If it's an MS Access database, you can set properties on the connection string so that users always open the database in Read-Only mode.
If you are considering something like SQL Server, user permissions can allow viewing but not updating data.
Is there a way to automate the data being loaded to Excel.
One alternative solution, it’s not cheap but you can have a sql warehouse which gives you a jdbc connection and write a vb macro to query the data and drop into a data sheet.
As ever.. what’s the use case?
To pull data into a spreadsheet without downloading and importing. Simple as that.
That’s not a use case, they doing that for fun?
As someone who loves Excel, I have to comment on this one.
The answer is simple: Power Query. This is the way.
https://learn.microsoft.com/en-us/power-query/connectors/databricks
You can write a Python script to run in a notebook or job and write the results to an Excel file or CSV.
Thanks for the advice! I was just wondering if there was a build-in solution for less technical users. Those who only use Databricks to access the data. For example, actuaries...
You can download a CSV from the query result from a %SQL cell or the SQL editor, but a limit of 1GB or 100k rows will apply. The code to run a query and write to a file, either a new file or updating one alongside your notebook/in a volume should be pretty short and the Databricks Assistant/Claude/ChaGPT could write it for you.
Alternatively, you might be able to accomplish the task you're working on in Databricks without exporting to Excel?
Execute rights on a notebook with a couple of widgets.
Never tried this, I know this isn't automated, but stops you from having to download.
Connect to Databricks from Microsoft Excel | Databricks Documentation https://share.google/qDPKXWdTLtCFZNjFV
Again, not as good as the other comment about using Python
Thanks!
how to manage data connections in excel
Key Considerations for Managing Data Connections in Excel
Understanding Data Connections:
Creating a Data Connection:
Managing Existing Connections:
Refreshing Data:
Error Handling:
Security Considerations:
Recommendations:
By following these tips, you can effectively manage data connections in Excel, ensuring your data is accurate and up-to-date.
Get more comprehensive results summarized by our most cutting edge AI model. Plus deep Youtube search.