pub struct ToColFn;Expand description
Converts an array or range into a single column.
Flattens input values into one column, 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 row by row"
formula: "=TOCOL({1,2;3,4})"
expected: [[1],[2],[3],[4]]title: "Scan by column"
formula: "=TOCOL({1,2;3,4},0,TRUE)"
expected: [[1],[3],[2],[4]]related:
- TOROW
- HSTACK
- VSTACK
faq:
- q: "Can TOCOL filter blanks and errors?"
a: "Yes. Use the ignore argument to drop blanks, errors, or both."Trait Implementations§
Source§impl Function for ToColFn
[formualizer-docgen:schema:start]
Name: TOCOL
Type: ToColFn
Min args: 1
Max args: variadic
Variadic: true
Signature: TOCOL(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 ToColFn
[formualizer-docgen:schema:start] Name: TOCOL Type: ToColFn Min args: 1 Max args: variadic Variadic: true Signature: TOCOL(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 ToColFn
impl RefUnwindSafe for ToColFn
impl Send for ToColFn
impl Sync for ToColFn
impl Unpin for ToColFn
impl UnsafeUnpin for ToColFn
impl UnwindSafe for ToColFn
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