Synthoid/ExportSheetData

(General/JSON) Sidebar sheet selection doesn't work properly

Opened this issue · 15 comments

Hi,

I noticed something odd recently. Everytime I deselect one of my sheets in the list and select another sheet instead, the exporter does not export the newly selected sheet. It only does that when i export the sheet again. I am guessing this has something to do with the sidebar not saving settings properly?

Sorry for the delayed response. It sounds like event listeners are not getting reset properly after reloading the sidebar. I'll take a look and see if I can fix the issue. A quick workaround should be setting the export target to current sheet only, then resetting it to custom and selecting your sheets.

No problem, yes i noticed that too. Apparently selecting "All sheets" resets the whole thing as well.

I get this bug too. Apparently, it happens only if you have more than 12 sheets in the document or so. After some time, it stops responding to tick on/off. And I noticed it's always the last sheet which stops working. Every time I add a new sheet, I dread of ticking it, cuz it's a nightmare :(

I get this bug too. Apparently, it happens only if you have more than 12 sheets in the document or so. After some time, it stops responding to tick on/off. And I noticed it's always the last sheet which stops working. Every time I add a new sheet, I dread of ticking it, cuz it's a nightmare :(

Hmm. I'll take a look at the issue again this weekend and see if I can replicate the issue. Would you be able to share a sample document that is affected by the issue so I know I am seeing the same thing as you @killeriukas ?

I get this bug too. Apparently, it happens only if you have more than 12 sheets in the document or so. After some time, it stops responding to tick on/off. And I noticed it's always the last sheet which stops working. Every time I add a new sheet, I dread of ticking it, cuz it's a nightmare :(

Hmm. I'll take a look at the issue again this weekend and see if I can replicate the issue. Would you be able to share a sample document that is affected by the issue so I know I am seeing the same thing as you @killeriukas ?

Here is a link to the document: https://docs.google.com/spreadsheets/d/1lmBM23NO2nvRxDqcwm9S0PtaMBYEytqWyUzexMNEqV0/edit?usp=sharing

What I do to get the bug easily is: select to export it as a custom - then select all, then scroll to the very bottom of the list and start unselecting the last ones, and you will notice that the ALL flag does not untick. It seems that the last X number of sheets do not reflect on if they have been selected or not. This is horrible for me, cuz every time I add a new table it doesn't export the selection properly :(

EDIT: I couldn't get this bug to happen on any other documents though. Of course, they weren't as big as this one.

I've found the problem affecting you specifically @killeriukas. The sheet called "Paul's Notes" is what breaks the toggles. If you move it to be the last tab, all sheets before it can be checked and unchecked as expected.

I'm assuming that this is because of the apostrophe in the sheet name, which makes sense with how those toggles are generated and listened to. I think the fix there is to convert special characters in sheet names to their encoded versions. So Paul's Notes would become Paul's Notes on the backend (but would still export as just Paul's Notes). For now, getting rid of the apostrophe in the sheet name should fix your problems.

I've found the problem affecting you specifically @killeriukas. The sheet called "Paul's Notes" is what breaks the toggles. If you move it to be the last tab, all sheets before it can be checked and unchecked as expected.

I'm assuming that this is because of the apostrophe in the sheet name, which makes sense with how those toggles are generated and listened to. I think the fix there is to convert special characters in sheet names to their encoded versions. So Paul's Notes would become Paul's Notes on the backend (but would still export as just Paul's Notes). For now, getting rid of the apostrophe in the sheet name should fix your problems.

OMG - yes. The ' breaks up the string, which in turn breaks the listeners. Darn. Thank you very much for finding what the problem was. I just removed the ' and the problem went away. Xaxaxa.

It shouldn't be hard to fix this to future proof the plugin so that no one else would bother you with the same problem down the line. I very much appreciate your help! Thank you.

Just pushed the v49 update which should fix this issue.

Annnnnd it's still there!

I'm not sure if this is the same problem, but for me it only seems to export the last sheet in my doc. I tried doing it with all defaults, and selecting specific sheets through the sidebar, and other things. But no matter what I do it just exports my last sheet. I can't seem to get it to export any of the other sheets. Actually, yeah, I just tried re-ordering the sheets. It's always just exporting the last one!

Actually...it's like completely random as to what it decides to export.

Hmm, interesting. You should be able to toggle the "All" checkbox on and off then select your desired sheets. That usually seems to fix the issue. I'm still hunting down the cause, but I'm hoping to find it by the week's end.

I've tried a whole bunch of manipulations, incl opening and closing the doc, reinstalling, etc, and they all seem to change the behavior, but I haven't got it to export anything like the whole doc yet (and it's not that large a doc, like 4 sheets and a smallish amount of data in each). Some possibly useful factoids: It's not my doc (shared with me) and there's another user on it. I'll trying copying it into my drive (which will make it unshared, so no multiple users) and see if that helps.

Copying did nothing, so I tried working through every option. It has something to do with Export Sheet Arrays. If this is off, I get weird partial sheet contents, if I turn it on, I get everything. (I don't even know what a sheet array is. If you mean the whole sheet, then maybe that should be on by default? Maybe it was, actually, and I turned it off? You might want to put a note at that switch, if this isn't a bug, that warns you that you'll get no data if this is off! However, I don't think that this is actually the whole problem, because I used to be just getting a random sheet, but it's possible I had a concordance of switches that was confusing me.)

Multiple users adjusting options for the same sheet at the same time have caused problems before, it's one of the usability problems on the roadmap to try and fix. It shouldn't be the sheet array option since that just exports sheets as JSON arrays instead of JSON objects. What other options do you have enabled?