Skip to content

all 3 sample functions can write to sheet with sheetid = 0 (ie 'Sheet1') but only 2 to active sheet #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
davidtew opened this issue Jul 7, 2020 · 2 comments

Comments

@davidtew
Copy link

davidtew commented Jul 7, 2020

I have created a spreadsheet to demonstrate: https://docs.google.com/spreadsheets/d/1aYb1mycYTwy67j2E9KNbJ7YVeAITQUO-hjWmm6iBoeA/edit?usp=sharing

This is how I reproduced the situation:

A:)
The sheet 'validation' I have prepared in a column (ColC) with each function preceded by a tick '
In cell 'validations'!B2 I have put formula =filter(C:C,len(C:C))
Via Data validations which reference 'validations'B:B the formulas are now accessible in any other cell to run the sample functions.
image

B:)
Since in any cell the formulaes in validations!B:B are accessible via Data validation, I created a data validation in one cell, then copied cell to other cells, to a total of 3 cells, in 'Sheet1' .
image

C:)
I then duplicated 'Sheet1' to create 'Copy of Sheet1' (which of course has a different sheetid).

D:) Experiment
1)
From the drop down in 'Copy of Sheet1'!B8 , I chose from the list: =RUN("getFileNamesFromFolderName"," ' Scarlett")
image

This wrote file names to sheet 'Copy of Sheet1'
image

From the drop down in 'Copy of Sheet1'!B7 I chose from the list =RUN("putValues","sample1","sample2","sample3")
And from the drop down in 'Copy of Sheet1'!B6 I chose from the list =RUN("setColors",ROW(),COLUMN(),10,15)

The experiment results:
Firstly, 'Copy of Sheet1'
image

Secondly,'Sheet1'
image

@tanaikech
Copy link
Owner

tanaikech commented Jul 7, 2020

Thank you for your comment. The sample script is a simple sample script for confirming this methodology. So I think that this cannot be used for various situations. About this, I have to apologize.

The sample script uses the sheet ID of 0 by sheetId: 0,. I think that this is the reason of issue. And also, these sample scripts put the below rows of the formula. So when the formula is put to the continuous rows, it might not be able to be used. But, this is not the bug. If you want to use the sample script for other sheets and the continuous rows that the formulas are put, please modify the scripts.

If I misunderstood your comment, I apologize. At that time, please tell me.

@davidtew
Copy link
Author

davidtew commented Jul 7, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants