pub struct ToRowFn;Expand description
Converts an array or range into a single row.
Flattens input values into one row, with options to ignore blanks/errors and to scan by row or by column.
§Remarks
ignorevalues are0keep all,1ignore blanks,2ignore errors,3ignore both.scan_by_columndefaults to FALSE, so values are read row by row.
title: "Flatten to row"
formula: "=TOROW({1,2;3,4})"
expected: [[1,2,3,4]]title: "Scan by column"
formula: "=TOROW({1,2;3,4},0,TRUE)"
expected: [[1,3,2,4]]related:
- TOCOL
- HSTACK
- VSTACK
faq:
- q: "Does TOROW preserve row order by default?"
a: "Yes. The default scan order is row-major."Trait Implementations§
Source§impl Function for ToRowFn
[formualizer-docgen:schema:start]
Name: TOROW
Type: ToRowFn
Min args: 1
Max args: variadic
Variadic: true
Signature: TOROW(arg1: range|any@range, arg2?: number@scalar, arg3?…: logical|number@scalar)
Arg schema: arg1{kinds=range|any,required=true,shape=range,by_ref=false,coercion=None,max=None,repeating=None,default=false}; arg2{kinds=number,required=false,shape=scalar,by_ref=false,coercion=NumberLenientText,max=None,repeating=None,default=true}; arg3{kinds=logical|number,required=false,shape=scalar,by_ref=false,coercion=None,max=None,repeating=None,default=true}
Caps: PURE
[formualizer-docgen:schema:end]
impl Function for ToRowFn
[formualizer-docgen:schema:start] Name: TOROW Type: ToRowFn Min args: 1 Max args: variadic Variadic: true Signature: TOROW(arg1: range|any@range, arg2?: number@scalar, arg3?…: logical|number@scalar) Arg schema: arg1{kinds=range|any,required=true,shape=range,by_ref=false,coercion=None,max=None,repeating=None,default=false}; arg2{kinds=number,required=false,shape=scalar,by_ref=false,coercion=NumberLenientText,max=None,repeating=None,default=true}; arg3{kinds=logical|number,required=false,shape=scalar,by_ref=false,coercion=None,max=None,repeating=None,default=true} Caps: PURE [formualizer-docgen:schema:end]
fn name(&self) -> &'static str
fn min_args(&self) -> usize
fn variadic(&self) -> bool
fn arg_schema(&self) -> &'static [ArgSchema]
Source§fn eval<'a, 'b, 'c>(
&self,
args: &'c [ArgumentHandle<'a, 'b>],
ctx: &dyn FunctionContext<'b>,
) -> Result<CalcValue<'b>, ExcelError>
fn eval<'a, 'b, 'c>( &self, args: &'c [ArgumentHandle<'a, 'b>], ctx: &dyn FunctionContext<'b>, ) -> Result<CalcValue<'b>, ExcelError>
fn namespace(&self) -> &'static str
fn volatile(&self) -> bool
Source§fn aliases(&self) -> &'static [&'static str]
fn aliases(&self) -> &'static [&'static str]
Source§fn dependency_contract(
&self,
_arity: usize,
) -> Option<FunctionDependencyContract>
fn dependency_contract( &self, _arity: usize, ) -> Option<FunctionDependencyContract>
fn function_salt(&self) -> u64
Source§fn eval_reference<'a, 'b, 'c>(
&self,
_args: &'c [ArgumentHandle<'a, 'b>],
_ctx: &dyn FunctionContext<'b>,
) -> Option<Result<ReferenceType, ExcelError>>
fn eval_reference<'a, 'b, 'c>( &self, _args: &'c [ArgumentHandle<'a, 'b>], _ctx: &dyn FunctionContext<'b>, ) -> Option<Result<ReferenceType, ExcelError>>
Source§fn dispatch<'a, 'b, 'c>(
&self,
args: &'c [ArgumentHandle<'a, 'b>],
ctx: &dyn FunctionContext<'b>,
) -> Result<CalcValue<'b>, ExcelError>
fn dispatch<'a, 'b, 'c>( &self, args: &'c [ArgumentHandle<'a, 'b>], ctx: &dyn FunctionContext<'b>, ) -> Result<CalcValue<'b>, ExcelError>
Auto Trait Implementations§
impl Freeze for ToRowFn
impl RefUnwindSafe for ToRowFn
impl Send for ToRowFn
impl Sync for ToRowFn
impl Unpin for ToRowFn
impl UnsafeUnpin for ToRowFn
impl UnwindSafe for ToRowFn
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more