Google Apps Script TextFinder startFrom not starting from

后端 未结 1 1545
清酒与你
清酒与你 2021-01-27 09:05

I\'m trying to use TextFinder, but in my spreadsheet, I don\'t want to return the header row or column 1 in my results. I see that TextFinder has a \"startFrom\" method that\'s

相关标签:
1条回答
  • 2021-01-27 09:30

    Assuming ss is spreadsheet, you're creating a text finder for the entire spreadsheet. startFrom(range) only says

    The cell range after which the search should start

    If you use getCurrentMatch() or findNext() it'll return the next range matching your text criteria starting from that range(i.e., Sheet1!B2). If you want a textFinder specific to a range, then create the text finder on that range:

    var tf = ss
        .getSheetByName('Sheet1')
        .getRange('B2:B')
        .createTextFinder(text)
    
    0 讨论(0)
提交回复
热议问题