Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#290 3 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@jeremy-msft ci sta già lavorando.

Dal 20/9/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

Status: in backlog Type: product bug

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.

Lingua principale
TypeScript
Stelle
71
Fork
36
Merge medio
4g 14h
PR unite (30g)
12

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OfficeDev/office-scripts-docs-reference

Tutte le issue di OfficeDev/office-scripts-docs-reference

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.