kyle-hoskins
Aug 23, 2022Brass Contributor
Status:
New
Select Multiple Discontiguous Cells / Ranges / RangeAreas in Excel OfficeJS Javascript Add-in
In Excel or via VBA, users can select multiple ranges. However, in the Javascript API, selecting multiple, discontiguous ranges is not available. I would love for this to be supported please!
Currently:
- RangeAreas does not have a select() function.
- Workbook does not have a setSelectedRanges function.
- Range has select(), but does not allow qualifying multiple cells/ranges as a single range: activeWorksheet.getRange("A1, B2").select(); // fails on getRange()
Thanks!
Kyle
- JKPieterseSilver Contributor
Next on my wish list: A proper Union method for the Range/RangeAreas object!
- AdrianWu
Microsoft
Hey, no problem! We also noticed that you have a post specifically for the Union method. We will continue to track the Union feature request there and close the ticket here.
Request for a Union method for the Excel office-js libraryThank you for your continued support of the OfficeJS ecosystem!!!
- JKPieterseSilver Contributor
AdrianWuNice!
-off to update my add-ins!-
- AdrianWu
Microsoft
Hi! I'm excited to share some great news - the capability to select multiple discontiguous ranges into one collection is now supported in the latest Excel Requirement Set 1.18!
Please check out the details here:
Hope this is helpful!!