Skip to content
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

ExcelScript.ListDataValidation.source can't take a ExcelScript.Range #290

Open
Asguho opened this issue Sep 20, 2023 · 3 comments
Open

ExcelScript.ListDataValidation.source can't take a ExcelScript.Range #290

Asguho opened this issue Sep 20, 2023 · 3 comments
Assignees
Labels
Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown Type: product bug Bug in the Office Scripts platform or Office Scripts APIs

Comments

@Asguho
Copy link

Asguho commented Sep 20, 2023

When I run the following code snippet, it runs indefinitely without performing any action:

function main(workbook: ExcelScript.Workbook) {
    const rangeDataValidation = workbook.getActiveWorksheet().getRange("B2:B5").getDataValidation();
    rangeDataValidation.setRule({
        list: {
            inCellDropDown: true,
            source: workbook.getWorksheet("Data").getRange("A1:A3")
        }
    });
}

However, when I run the following code:

function main(workbook: ExcelScript.Workbook) {
    const rangeDataValidation = workbook.getActiveWorksheet().getRange("B2:B5").getDataValidation();
    rangeDataValidation.setRule({
        list: {
            inCellDropDown: true,
            source: "test1,test2,test3"
        }
    });
}

Everything works as expected. Am I doing something wrong with the cell range in the first code snippet?

(If this is not the appropriate place for this issue, please redirect me to the correct repository.)


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Sep 20, 2023
@AlexJerabek
Copy link
Collaborator

Hi @Asguho,

Thanks for reporting this issue. I was able to reproduce the problem, which seems like a bug to me. Let me assign @jeremy-msft to investigate further.

@AlexJerabek AlexJerabek added Needs: attention 👋 Waiting on Microsoft to provide feedback Type: product bug Bug in the Office Scripts platform or Office Scripts APIs and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Sep 20, 2023
@jeremy-msft
Copy link
Member

Hi @Asguho, thanks for reporting this issue; it has been added to our backlog for further investigation (internal tracking ID 8378165).

@AlexJerabek AlexJerabek added Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Oct 3, 2023
@duane-j-wagner
Copy link

I read somewhere in the docs that you can do dynamic lists with an excel formula string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: in backlog Issue is being tracked in the backlog but timeline for resolution is unknown Type: product bug Bug in the Office Scripts platform or Office Scripts APIs
Projects
None yet
Development

No branches or pull requests

4 participants