Cannot remove linked excel data source in VISIO

Anonymous
2025-09-19T15:53:23.1233333+00:00

I have a linked excel workbook to my Visio file. When I try to "remove data source", Visio hangs up and is stuck on an infinite loading loop.

Alternatively, I tried adding a second data source to see if the problem is only with "data source 1". I was able to add the same linked excel worksheet and remove it easily. So not sure why Visio is not letting me remove this first instance.

Furthermore, It's also not letting me refresh data anymore, I get the following error: User's image

I know there is no problem with my Excel file because as I mentioned I can link it as second source and it works fine.

Any input is appreciated. Thank you.

Microsoft 365 and Office | Visio | For business | Other

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Vy Nguyen 11,410 Reputation points Microsoft External Staff Moderator
2025-09-19T16:53:31.56+00:00

Hi @HR

Thank you for reaching out to the Microsoft Q&A forum and sharing the details of your experience with Visio. I understand how important it is to maintain a smooth workflow, and I appreciate your patience as we work through this together. 

Based on your description and the error message “Unexpected end of file” you encountered when attempting to refresh the data, it appears that Visio is having trouble processing the original data source link. This can sometimes happen due to internal inconsistencies in how the data connection is stored. 

To better assist you, could you please help us with a few additional details? 

  1. Which version of Visio are you currently using? (e.g., Visio 2019, Visio for Microsoft 365) 
  2. Is your Visio file stored locally or on a cloud service (e.g., OneDrive, SharePoint)? 
  3. Is the Excel workbook stored in the same location as the Visio file? 
  4. Are you using a table or named range in Excel for the data link? 

These details will help us tailor the solution to your specific environment. 

In the meantime, please follow some workarounds that you can try: 

1/ Try to relink the original Data Source 

This step helps reset the connection and may allow you to remove it afterward. 

  • Open your Visio file. 
  • Click on the Data Visualizer diagram container. 
  • Go to the Data Tools Design tab. 
  • Select Relink Source Data. 
  • Choose the same Excel workbook and table/range. 
  • After relinking, try removing the data source again. 

2/ You can clean up shape data (Optional but Recommended) 

If Visio retains old fields from the previous link, this step helps reset them. 

  • Insert a new shape (e.g., Manager) from a blank Org Chart. 
  • Copy this shape into your existing diagram. 
  • Open the Shape Data Window. 
  • Right-click below the fields and choose Shape Data Sets > Add. 
  • Create a new set based on the clean shape and apply it to the affected shapes. 

3/ Then try to refresh the Data Source 

To ensure the connection is working properly: 

  • Open the Visio file in the desktop app. 
  • Select the diagram container. 
  • Go to Data Tools Design > Update Source Data. 
  • If prompted, relink the source first. 
  • Save and close both Excel and Visio files. 
  • Reopen Excel and click Refresh in the diagram area. 

For your information that you can concern:  

  • The error message “Unexpected end of file” may indicate that Visio is unable to read the full structure of the linked Excel file. Since you confirmed the file works fine when added as a second source, this suggests the issue is isolated to the first link. 
  • If the issue persists, consider creating a new diagram using the same Excel file to bypass the corrupted link. 

  Note: Please understand that our initial response does not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.   I hope the information provided proves useful. Please proceed with the outlined steps and let me know whether they resolve the issue. If not, I’ll be glad to continue working with you to find a solution.   

Thank you for your patience and understanding throughout this process. Should you have any questions or need further assistance, feel free to reach out at any time.  

I look forward to hearing from you. 


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment”.     

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Newest
  1. John Vines - CRC 0 Reputation points
    2026-03-21T17:28:25.6766667+00:00

    Hi

    Given that you can add/remove the same workbook as “Data source 2,” the problem is likely corruption in how the first data connection was stored in the file - not the Excel table itself. The lowest-risk fixes are: (1) relink the original data source (same workbook + same table/range) to “reset” the connection metadata, then retry removal; (2) test the file locally in the desktop app (cloud sync/partial files can cause “unexpected end of file” symptoms); (3) if refresh is broken, duplicate the Visio file, remove the bad data connection in the duplicate, and re-link cleanly. If you can, also validate that the Excel source is a proper Excel Table and not a range that’s been resized or partially corrupted over time.

    I hope this information is helpful. 


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Was this answer helpful?

    0 comments No comments
  2. Vy Nguyen 11,410 Reputation points Microsoft External Staff Moderator
    2025-09-23T16:49:08.0566667+00:00

    Hi @HR

    I hope the information I shared earlier was at least somewhat helpful in addressing your issue. If the previous methods haven’t been effective, please feel free to let me know. I’d be happy to explore the issue more deeply with you so we can work together toward a better solution. 

    If you found the answer helpful, we kindly invite you to mark it as the accepted answer. Once marked, it will automatically be pinned to the top. Since many other users also search for information in this community, your valuable contribution will help them easily find the right channel and useful insights more quickly. 

    Thank you very much, and I wish you a great day.

    Was this answer helpful?

    0 comments No comments