Unexpected behavior when refreshing internal data connections in Excel
Hi, guys.

I have faced a big and inconvenient problem with Excel spreadsheets that have internal data connections (queries that selects ranges of the own workbook) in them.

I wiil start by showing the problem e exposing how to reproduce it.

Problem: if I have some internal connetion and another instance (pay attention, instance, not other workbook) was already open, when refreshing that connection, the same workbook (which have the internal connection) is instantly opened in readonly mode in another window...

Why this occurs? The problem is that I'm developing a .NET automation application for Excel and this behavior breaks some process flow (because the readonly file stays open e sometimes it causes a non refresh in the original workbook)

To solve this problem I began to use the same instance if it is already open, but this is not the best solution because I need to handle the concurrency when running several VBA macros in the same instance via .NET Interop.

I hope someone knows how to solve this problem because I've been searching for this several days...

Thanks,

Obs.: The Office version is 2013

September 12th, 2015 11:53am