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

Request for a Union method for Excel #4404

Closed
hugo082 opened this issue Apr 26, 2024 · 3 comments
Closed

Request for a Union method for Excel #4404

hugo082 opened this issue Apr 26, 2024 · 3 comments
Assignees
Labels
Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP Type: product feature request Office JS ideas that should be posted to aka.ms/m365dev-suggestions (formerly User Voice.)

Comments

@hugo082
Copy link

hugo082 commented Apr 26, 2024

In the VBA Object library, the Application object has a Union method. This method allows one to easily gather (non-)contiguous ranges into one collection. The Union method is smart enough to build contiguous ranges where possible (it creates one range A1:A10 if passed cells A1 to A10 in any order).

The office-js object library does not expose a Union method in the Excel context and it would be a welcome addition. For example when creating an application that searches for a string in all formulas of a sheet.

If we use the findAll method of the worksheet object, office-js reports all found cells individually, potentially resulting in many single cells.

Using the Union method one could build contiguous ranges of cells that share the same formulaR1C1. This way we can prevent reporting hundreds or even thousands of single cells to the user and summarize found items into their contiguous ranges containing a "copied" formula.

In VBA, Union is a very efficient way to first collect blocks of contiguous ranges prior to doing an operation on in one command, such as changing their formatting. I expect this may apply to office-js as well.

Original request on the Microsoft tech community

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Apr 26, 2024
@SiruiSun-MSFT
Copy link

Hi @hugo082, thanks for your feedback here! We have already opened an internal feature ask #8942322 to track this request. And we will consider the request list when we go through our planning process.

@SiruiSun-MSFT SiruiSun-MSFT added the Type: product feature request Office JS ideas that should be posted to aka.ms/m365dev-suggestions (formerly User Voice.) label Apr 29, 2024
@shanshanzheng-dev shanshanzheng-dev added the Needs: author feedback Waiting for author (creator) of Issue to provide more info label Apr 29, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: no recent activity Issue or PR is stale (no recent activity) label May 3, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

Copy link
Contributor

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.

@shanshanzheng-dev shanshanzheng-dev removed Needs: author feedback Waiting for author (creator) of Issue to provide more info Status: no recent activity Issue or PR is stale (no recent activity) labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP Type: product feature request Office JS ideas that should be posted to aka.ms/m365dev-suggestions (formerly User Voice.)
Projects
None yet
Development

No branches or pull requests

5 participants