Cannot remove linked excel data source in VISIO

HR 20 Reputation points
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
0 comments No comments
{count} votes

Answer accepted by question author
  1. Vy Nguyen 7,845 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. 

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vy Nguyen 7,845 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.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.