Bug #79556 All Connections cleared on closing Excel Workbook
Submitted: 8 Dec 2015 11:15 Modified: 10 Dec 2015 21:01
Reporter: Benjamin Hänisch Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S1 (Critical)
Version:1.3.5 x86 OS:Windows (Windows 10 Pro)
Assigned to: CPU Architecture:Any
Tags: Microsoft Excel, MySQL

[8 Dec 2015 11:15] Benjamin Hänisch
Description:
I'm running Microsoft Office Professinal Plus 2013. I'm using MySQL for Excel to connect multiple tables from my server. 

Since last Monday (without updating any service or software to my knowledge) when closing the workbook all connections are lost. 

I've now tried diffrent ways to save in a diffrent format, but the result ist the same. I connect multiple tables, save the workbook manually before closing, close the workbook, i can see all imported data disappearing and will then be asked if I want to save the workbook. 

How to repeat:
Open Excel Workbook 
add connection or connections to MySQL Database
Save Workbook as .xlsm or .xlsx
see connections beeing cleared and data disappearing
confirm "save changes to workbook"
reopen file
all connections are gone
[8 Dec 2015 17:13] Javier Treviño
Hi Benjamin,
Can you be more specific about the bug you are reporting?
You state that you add connections to the MySQL Database. Do you mean that you are on the Welcome Panel and clicking "New Connection", then after adding some local or remote connections these disappear from the list after saving the workbook?
[9 Dec 2015 9:40] Benjamin Hänisch
Hey Javier, 

sorry about not being more specific. 

So I'm in Excel now in a workbook i created. I'm using the MySQL add-on to connect to existing remote connections, which are set up in my MySQL Workbench. So I choose the remote connection I want, then i choose the schema and the table I want to connect. I hit "Import MySQL Data". In the window I choose Import without any changes to the preset. Then I add another table in another sheet in the same workbook. Data is imported and I can see the connections in Excel under the Data Ribbon in "Connections". 

If I check a sheet in the workbook thats using the imported data its just working. 

Then I hit the save button. I still have the sheet open, that uses the data from the connections. The data is still there after hitting save. 

Then I hit the close cross of excel. Just after hitting the data used in the sheet from the remote tables disappears and an excel dialog opens asking if I "Want to save your changes to "File.xlsm"? I hit Yes and excel closes.

When I now reopen the workbook, the data is still gone and there are no connections in the Data ribbon under connections.  

I hope this helps. If you need any more details let me know. 

Ben
[9 Dec 2015 11:29] Chiranjeevi Battula
Hello  Benjamin,

Thank you for your feedback.
I tried to reproduce the issue at my end using MS Excel 2013, MySQL for Excel 1.3.5 but not seeing any issue in connections and data.
Could you please provide repeatable test case (exact screenshot, etc. - please make it as private if you prefer) to confirm this issue at our end?

Thanks,
Chiranjeevi.
[9 Dec 2015 11:30] Chiranjeevi Battula
screenshot

Attachment: 79556.PNG (image/png, text), 142.22 KiB.

[9 Dec 2015 12:00] Benjamin Hänisch
hey Chiranjeevi, 

I think it might be easiest if you could see the whole process. I'll send a shot screen recording. 

Hope this helps.
Ben
[9 Dec 2015 18:55] Javier Treviño
Hi Benjamin,
Thanks for uploading and sharing the video, that is VERY helpful.
So the connections you say were being cleared upon saving are the Workbook Connections created by MySQL for Excel when importing data into a ListObject.

This clarifies my question.
I saw in your video not only the Workbook Connections were cleared, but also the imported data was not saved, which leads me to think the bug looks like the one reported in https://bugs.mysql.com/bug.php?id=76475

That bug was fixed in MySQL for Excel 1.3.4, I see you created this bug report stating you have 1.3.5.  Can you please confirm your version??

Chiran and I ran a quick test following the exact steps you followed in your video, and we don't see any problem. After reopening the saved Workbook I can see both the imported data and the Workbook Connection in the Data > Connections dialog.

My best guess is that you are using 1.3.4, or that there may be a setting in Excel at your end that is preventing the data from being saved.
[10 Dec 2015 9:51] Benjamin Hänisch
Yes, I'm positive that I'm using 1.3.5 I'll attach a screenshot. 

what do you think the best course of action would be? should I do a clean reinstallation of office and mySQL workbench and the addon?

thanks for your help. 
Ben
[10 Dec 2015 11:56] Chiranjeevi Battula
Hello  Benjamin,

Thank you for your feedback.
Developer and I tried to reproduce the issue at our end using MS Excel 2013, MySQL for Excel 1.3.5 but we not seeing any issue in connections and data.
Could you please reinstall and try it  once?

Thanks,
Chiranjeevi.
[10 Dec 2015 12:12] Benjamin Hänisch
Ok this is crazy, I now just tried diffrent ways of saving an somehow managed to get the workbook to save and retain the data. 

It seems to work in the following way: i open the addin in excel, add the table-connections, then CLOSE the ADDIN, save the workbook and close excel. Data and connections are retained. 

nevertheless, I'll reinstall the addin and if this yields no results I'll reinstall office and the plugin. I'll let you know if anything works.

Ben
[10 Dec 2015 21:01] Javier Treviño
Hi Benjamin,
The fact that this was related to a save triggered by closing the Excel workbook leads me to think this issue might be related to bug 78910.

Although the bug is actually happening in Excel 2007, I fixed some bad behavior for Excel 2010 and above when closing a Workbook, so I would ask you to wait for the release of 1.3.6 (can't comment here a release date but it will be soon) and for now do not close the Workbook and Save directly. Then please test this on 1.3.6 and if the problem persists you can reopen this bug... for now I will close it, but don't worry it can be reopened later.

Thanks a lot for your help.
[30 Mar 2022 12:36] Jose S
Hi,

I'm using version 1.3.8 I'm still seeing the exact bug that Ben reported, anything that I could do?

What kind of solutions / workarounds are available?