You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have used the search tool and did not find an issue describing my idea.
Your idea.
Currently, when using custom functions in OnlyOffice, the arguments are passed as their corresponding values.
It would be highly useful if the function could receive the actual cell references (e.g., the row and column information) in addition to the values.
This would allow developers to create more robust and context-aware functions, such as validating data ranges before performing calculations.
Example:
If I define the custom function =MY_FUNCT(A1:A5, B1:B5):
Current behavior: The function receives only the values in the ranges A1:A5 and B1:B5. Requested behavior: The function also receives metadata, such as { range: "A1:A5", startRow: 0, endRow: 4, startCol: 0, endCol: 0, values: [...] }.
With this enhancement, the function could validate the inputs before performing calculations.
For example:
Api.addCustomFunction("MY_FUNCT", function(range1, range2) {
// Validate that both ranges start and end on the same rows
if (range1.startRow !== range2.startRow || range1.endRow !== range2.endRow) {
return "Error: Ranges must start and end on the same row.";
}
// Perform the calculation
return range1.values.map((val, index) => val + range2.values[index]);
});
Calling =MY_FUNCT(A1:A5, B1:B6) would then return:
"Error: Ranges must start and end on the same row."
Thank you for considering this enhancement!
The text was updated successfully, but these errors were encountered:
This issue is unique.
Your idea.
Currently, when using custom functions in OnlyOffice, the arguments are passed as their corresponding values.
It would be highly useful if the function could receive the actual cell references (e.g., the row and column information) in addition to the values.
This would allow developers to create more robust and context-aware functions, such as validating data ranges before performing calculations.
Example:
If I define the custom function
=MY_FUNCT(A1:A5, B1:B5)
:Current behavior: The function receives only the values in the ranges
A1:A5
andB1:B5
.Requested behavior: The function also receives metadata, such as
{ range: "A1:A5", startRow: 0, endRow: 4, startCol: 0, endCol: 0, values: [...] }
.With this enhancement, the function could validate the inputs before performing calculations.
For example:
Calling
=MY_FUNCT(A1:A5, B1:B6)
would then return:"Error: Ranges must start and end on the same row."
Thank you for considering this enhancement!
The text was updated successfully, but these errors were encountered: