Non-anonymous functions as arguments in spreadsheet environments
Abstract
Technology is disclosed herein by which a spreadsheet function is accepted as an argument to another function in a spreadsheet. In an implementation, a computing apparatus identifies a formula in a cell, the formula including a first function which has a parameter for the name of a second, non-anonymous function. The computing apparatus passes the function name as an argument to the first function for execution. In executing the first function, the computing apparatus calls the second function and passes a value as an argument to the second function. The computing apparatus updates the spreadsheet based on one or more results of the first function. In an implementation, when the first function calls the second function, the first function iterates through a range of values passed to it as an argument.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 48 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A computing apparatus comprising: one or more computer readable storage media; one or more processors operatively coupled with the one or more computer readable storage media; and program instructions stored on the one or more computer readable storage media that, when executed by the one or more processors, direct the computing apparatus to at least: identify a formula in a cell of a spreadsheet, wherein the formula includes a first function having a parameter comprising a name of a second function, wherein the formula further includes a parameter comprising one or more values, and wherein the second function comprises a non-anonymous function that is passed by name only without an argument and lacks function notation; pass the name of the second function as an argument to the first function; identify a common characteristic based on the first function; aggregate the one or more values into one or more subarrays according to the common characteristic; execute the first function, wherein the first function iteratively calls the second function and passes each of the one or more subarrays as an argument to the second function; and populate the spreadsheet based on one or more results of the first function.
- Claim 2Depends on #1
The computing apparatus of claim 1, wherein the common characteristic comprises one of: cell column, cell row, cell format, and cell value.
- Claim 3Depends on #1
The computing apparatus of claim 1, wherein the formula follows a syntax comprising: a name of a function followed by a list of parameters captured parenthetically after the name of the function, and wherein one parameter in the list of parameters identifies another function to be passed as an argument to the function along with at least one other of the list of parameters.
- Claim 4Depends on #3
The computing apparatus of claim 3, wherein the program instructions further direct the computing apparatus to generate a subroutine for iteratively calling the second function to process each of the one or more subarrays.
- Claim 5Depends on #4
The computing apparatus of claim 4, wherein the list of parameters comprises a conditional expression, and wherein the first function, when calling the second function, passes a value from the one or more values to the second function if the value satisfies the conditional expression.
- Claim 6Depends on #1
The computing apparatus of claim 1, wherein the parameters do not include a LAMBDA function and wherein the one or more values comprise a group of cells in the spreadsheet.
- Claim 7Depends on #6
The computing apparatus of claim 6, wherein the first function comprises a BYCOL function and wherein the second function comprises one of a native function and a user-defined function of a spreadsheet application.
- Claim 8Depends on #1
The computing apparatus of claim 1, wherein a syntax of the parameters includes the one or more values and a name but does not include any parameters to be explicitly included for the second function.
- Claim 9Independent Claim
A method of operating a spreadsheet application, comprising: receiving a formula in a cell of a spreadsheet; identifying, in the formula, a first function having a parameter comprising a name of a second function, wherein the formula further includes a parameter comprising one or more values, and wherein the second function comprises a non-anonymous function that is passed by name only without an argument and lacks function notation; passing the name of the second function as an argument to the first function; identifying a common characteristic based on the first function; aggregating the one or more values into one or more subarrays according to the common characteristic; executing the first function, wherein the first function iteratively calls the second function and passes each of the one or more subarrays as an argument to the second function; and populating the spreadsheet based on one or more results of the first function.
- Claim 10Depends on #9
The method of claim 9, wherein the common characteristic comprises one of: cell column, cell row, cell format, and cell value.
- Claim 11Depends on #9
The method of operating the spreadsheet application of claim 9, wherein the formula follows a syntax comprising: a name of a function followed by a list of parameters captured parenthetically after the name of the function, and wherein one parameter in the list of parameters identifies another function to be passed as an argument to the function along with at least one other of the list of parameters.
- Claim 12Depends on #11
The method of operating the spreadsheet application of claim 11, further comprising generating a subroutine for iteratively calling the second function to process each of the one or more subarrays.
- Claim 13Depends on #12
The method of operating the spreadsheet application of claim 12, wherein the list of parameters comprises a conditional expression, and wherein the first function, when calling the second function, passes a value from the one or more values to the second function if the value satisfies the conditional expression.
- Claim 14Depends on #9
The method of operating the spreadsheet application of claim 9, wherein the parameters do not include a LAMBDA function and wherein the one or more values comprise a group of cells in the spreadsheet.
- Claim 15Depends on #14
The method of operating the spreadsheet application of claim 14, wherein the first function comprises a BYCOL function and wherein the second function comprises one of a native function and a user-defined function of the spreadsheet application.
- Claim 16Depends on #9
The method of operating the spreadsheet application of claim 9, wherein a syntax of the parameters includes the one or more values and a name but does not include any parameters to be explicitly included for the second function.
- Claim 17Independent Claim
One or more computer readable storage media having program instructions stored thereon that, when executed by one or more processors of a computing device, direct the computing device to at least: identify a formula in a cell of a spreadsheet, wherein the formula includes a first function having a parameter comprising a name of a second function, wherein the formula further includes a parameter comprising one or more values, and wherein the second function comprises a non-anonymous function that is passed by name only without an argument and lacks function notation; pass the name of the second function as an argument to the first function; identify a common characteristic based on the first function; aggregate the one or more values into one or more subarrays according to the common characteristic; execute the first function, wherein the first function iteratively calls the second function and passes each of the one or more subarrays as an argument to the second function; and populate the spreadsheet based on one or more results of the first function.
- Claim 18Depends on #17
The one or more computer readable storage media of claim 17, wherein the formula follows a syntax comprising: a name of a function followed by a list of parameters captured parenthetically after the name of the function, and wherein one parameter in the list of parameters identifies another function to be passed as an argument to the function along with at least one other of the list of parameters.
- Claim 19Depends on #18
The one or more computer readable storage media of claim 18, wherein the program instructions further direct the computing device to generate a subroutine for iteratively calling the second function to process each of the one or more subarrays.
- Claim 20Depends on #19
The one or more computer readable storage media of claim 19, wherein the list of parameters comprises a conditional expression, and wherein the first function, when calling the second function, passes a value from the one or more values to the second function if the value satisfies the conditional expression.
Technical Overview & Description
TECHNICAL FIELD Aspects of the disclosure are related to the field of computer software applications and, in particular, to spreadsheet applications and associated technology. BACKGROUND Spreadsheet applications are computer software programs that allow users to store, organize, and analyze data in tabular form. The rows and columns of a representative worksheet define cells into which data and formulas may be entered. A given cell may simply hold data in it, such as a number or text string, or the cell may contain a formula that automatically calculates a value for the cell. Formulas can also employ functions that perform pre-defined calculations or return information about a spreadsheet. The functions may be pre-built functions provided as part of an application, or user-defined functions created by a user. In spreadsheet environments, lambda functions are anonymous functions by which a user can define an operation in a cell formula for a limited, specific use. A user can define a lambda function for a complex expression (such as a function with multiple layers of nesting) and invoke the expression using a modular syntax with input values provided as arguments to the lambda function. Lambda functions can also be defined within other functions to pass an expression as argument without having to formally define a function for it. For example, a user might pass an expression to a plotting function to generate a graph of it. Despite their utility, lambda functions are unfamiliar to many spreadsheet users. In addition, the syntax for lambda functions is somewhat atypical of other more commonly used spreadsheet functionalities. As a result, this functionality is often underutilized. OVERVIEW Technology is disclosed herein for spreadsheet operations performed by a computing apparatus. In an implementation, the computing apparatus identifies a formula in a cell of a spreadsheet. The formula includes a first function which has a parameter comprising the name of a second fu
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (48)
Non-Patent Literature (5)
- Balanivash and Electric Coffee,
- “
- Passing Function name as arguments to a function
- ”
- ; Oct. 27, 2013, 5 pages, https://stackoverflow.com/questions/6356303/passing-function-name-as-arguments-to-a-function (Year: 2013).