tag:blogger.com,1999:blog-6691994129222744759.post5675610773665596809..comments2024-03-21T11:36:24.769-07:00Comments on Dynamics GP Land: C# errors updating Excel file: "External table is not in the expected format", and "Operation must use an updateable query"Christina Phillipshttp://www.blogger.com/profile/03332221198245457747noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6691994129222744759.post-70331181784247563022018-04-19T05:39:24.279-07:002018-04-19T05:39:24.279-07:00Yep, been coming to that same conclusion :). But t...Yep, been coming to that same conclusion :). But this fixes the last "insurmountable" problem we were experiencing. Thanks again!Anonymoushttps://www.blogger.com/profile/05218968273511615304noreply@blogger.comtag:blogger.com,1999:blog-6691994129222744759.post-50199163616712836082018-04-18T18:19:46.698-07:002018-04-18T18:19:46.698-07:00Hi Eric,
I don't believe I've updated the...Hi Eric,<br /><br />I don't believe I've updated the project since I wrote this post in 2012, and the customer hasn't complained, so the hack appears to have worked well enough and I haven't had to figure out a better solution.<br /><br />Given all of the problems I have had with Excel data sources, I discourage customers from using them and haven't had to deal with Excel files in years.<br /><br />SteveSteve Endowhttps://www.blogger.com/profile/03950475674093020502noreply@blogger.comtag:blogger.com,1999:blog-6691994129222744759.post-53198117825432662252018-04-17T13:23:03.594-07:002018-04-17T13:23:03.594-07:00That was brilliant! After going through dozens of ...That was brilliant! After going through dozens of "answers" that all talked about the connection string, this was what finally broke the back of the problem.<br /><br />I have an app that updates an excel file from a datagrid, then reads from the updated file to update a separate datagrid. I was getting the same error, apparently because the connection can't close fast enough after the excel file is updated to allow a follow-up read. Based on this, I was able to catch the error and re-try the read after a 50 millisecond delay. Problem appears to be solved!<br /><br />Did you ever find a better way? I'd prefer to check if the connection was available first rather than catch an error, but this seems to work OK right now.Anonymoushttps://www.blogger.com/profile/05218968273511615304noreply@blogger.com