Snowflake-Labs / Excelerator

This is an Excel Addin for Windows that reads and writes data to Snowflake
Apache License 2.0
78 stars 22 forks source link

Toolbar options revert to read-only ("upload" button disappears) #30

Closed mcupo-calix closed 2 years ago

mcupo-calix commented 2 years ago

The add-in keeps reverting to the "read only" version. That is, even though I downloaded the .xlam file for the full version of the add-in, excel only displays the "Query" button in the Home toolbar, not the "Upload" button.

I haven't found any pattern to when this happens or steps to reproduce - except that it inevitably does after a couple uses. This has occured on two different machines.

MicrosoftTeams-image (1)

ssegal100 commented 2 years ago

@mcupo-calix I would uninstall/delete the addin files. Find out where you downloaded them and also where it copied it to when installing. Once it's completely gone, install the full version. Let me know if that helps.

mcupo-calix commented 2 years ago

@ssegal100 Thanks for the fast response. I have tried a full reinstall a couple times (also have tried putting the .xlam directly into ./Excel/XLSTART) but the issue keeps occurring. I made sure to follow the installation steps as listed here: https://exceloffthegrid.com/install-uninstall-excel-add/ including "unblocking" the add-in.

While a full reinstallation does seem to temporarily fix the issue, I don't want to have to do a full reinstall with every couple uses.

EDIT: Just tested with a colleague too, when we replaced the .xlam in the same location with a fresh download, the issue got resolved - temporarily - and we didn't even have to reinstall the addin in excel. So maybe excel is modifying the .xlam file itself somehow?

ssegal100 commented 2 years ago

@mcupo-calix Is the read-only version of the addin anywhere on your laptop? I don't really see how it can use the read-only version if it's not even downloaded. This is a strange one!

mcupo-calix commented 2 years ago

@ssegal100 No, there is no read-only version installed. Yeah I agree that its strange, which was why I was hoping someone else had seen this issue before because I don't know how to debug. Using Windows 10 and the excel version below.

image

mcupo-calix commented 2 years ago

@ssegal100 Looks like it has something to do with the VBA code not working. I don't know what all these methods do exactly, but some of the sub names in this module sound very closely related to what I am seeing: https://github.com/Snowflake-Labs/Excelerator/blob/master/src/RibbonModule.bas

I'm 99% sure the error I am seeing is the result of some VBA bug: the ribbon isn't being properly configured/updated.

ssegal100 commented 2 years ago

@mcupo-calix Ahh good catch. Would you unhide the SnowflakeConfig worksheet by right clicking on the bottom tabs and click 'Unhide'. Then in the pop-up select 'SnowflakeConfig'. image This sheet contains some of the configs to drive Excelerator. What is the last value, 'ReadOnly'? It should be 'FALSE' for it to work properly. 'True' will cause it to behave in the way you are seeing. If it is 'True' you can change it it to 'FALSE'. This value should be saved when you reopen. So go ahead and close Excel and reopen it and see if it works properly. If not maybe we can do a Web conf.

ssegal100 commented 2 years ago

@mcupo-calix If the above value is 'FALSE' and you are not seeing all the buttons, then we will need to step through the executing code. Open the 'RibbonModule'. In the EnableControl sub-routine, add 'Stop' as the first line as seen below. Step through the code by clicking the F8 key. The value returned by the Sub should be 'True' for all buttons. image

Let me know if you want to do a web conf.

mcupo-calix commented 2 years ago

@ssegal100 I did confirm that the "ReadOnly" variable on the SnowflakeConfig tab was set to TRUE for some reason. That must be part of what is causing the issue, though I don't know what caused that value to switch.

ssegal100 commented 2 years ago

@mcupo-calix Did you ever install the read-only version? Let me know if it reoccurs after you shut it down and reopen a workbook or if you open a new one.

mcupo-calix commented 2 years ago

@ssegal100 I have been seeing this issue on a colleague's computer that I know for sure has never had the ReadOnly version installed.

One observation is that when I disable/delete the add-in, the SnowflakeConfig, SnowflakeWorkbookParams sheets don't get deleted. To do a full refresh, I tried deleteing all instances of the .xlam, deleting those worksheets, and then redownloaded and installed the add in (on my computer). After doing this, I haven't seen the original error, but instead have to re-add the add-in by checking the checkbox each time I boot excel.

ssegal100 commented 2 years ago

@mcupo-calix By any chance do you send your colleague a workbook to use? The last item you mentioned is behaving like the 'unblock' step wasn't done. When you redownload the file it needs to be unblocked. Could that be it?

mcupo-calix commented 2 years ago

@ssegal100 I did send my coworker the workbook, so maybe they inherited my ReadOnly=TRUE version of the SnowflakeConfig tab through that workbook?

Ah yes, you are correct about the "unblock" step. Apologies.

ssegal100 commented 2 years ago

@mcupo-calix Yes I believe that is what happened. Sounds like we have it figured out, right? I think I will have to work on the behavior when you install the read/write addon after the read only one.

mcupo-calix commented 2 years ago

@ssegal100 I think so yeah! I'll close the issue, and keep an eye out if you merge any changes.

Thanks for your help.