Office-js-docs-pr: Range Parameter

Created on 7 May 2019  Â·  8Comments  Â·  Source: OfficeDev/office-js-docs-pr

In the Range Parameters section:

  • @param {[][]} values Multiple ranges of values.
    is supposed to be:
  • @param {number[][]} values Multiple ranges of values.

Otherwise reader will get stuck in matrix data type if s/he is using Yo to generate metadata with annotations.


Document Details

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

Excel doc bug

All 8 comments

Hi @smozgur - thank you for reading the custom functions docs and pointing this out!
@akrantz / @keyur32 Let me know if we need to change the Definitely Typed repo and I can go ahead and regen the docs. We can also reroute this to the CF repo if you'd like to follow up there as well.

@mscharlock This appears to simply be a typo in the docs where "number" was left off.

Also, for clarity, the type number[][] represents a single range, e.g. "A1:C3"; a range contains multiple values.

The only reason to mention this is that support is coming for "repeating parameters" which is the Excel form for having a parameter represent multiple values of the same type. Today, a 1-dimensional array (number[]) will generate an error, but soon "number[]" type will allow for multiple number values. A 2-D array (number[][]) represents a single range. Similarly, in the future, a 3-D array will be able to represent _multiple_ ranges. So it helps to be precise about a single range versus multiple ranges.

@akrantz I used the sample line in the documentation, didn't pay attention on the description of the variable but simply its failure that would cause the reader to give up. Thanks for the clarification.

3-D array for multiple ranges sounds amazing!

@smozgur - thanks for report. Curious, what scenario do you think the 3D ranges will work for you? Thanks!

@keyur32 Like passing multiple ranges to a function in different dimensions? I understand 3-D range for this purpose.

Edit: Hmm, No different dimensions, different worksheets.

I've got a PR out with the changes you recommended @smozgur! Thank you again! In the meantime, best way to reach @keyur32 with questions about custom functions and planned upcoming features is either through email ([email protected]) or to open an issue on the Excel Custom Functions repo here (https://github.com/OfficeDev/Excel-Custom-Functions/). I'll close this issue when the PR is complete, but wanted to let you know a way to get some of your other questions answered.

Thank you!

Of course, you're very welcome! I'm going to close this now - update is in the docs. Feel free to open a new issue or re-open this one if you have additional questions. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fowl2 picture fowl2  Â·  5Comments

hyoshioka0128 picture hyoshioka0128  Â·  6Comments

Scheel picture Scheel  Â·  4Comments

NT-D picture NT-D  Â·  3Comments

charliereese picture charliereese  Â·  5Comments