pub struct HStackFn;Trait Implementations§
Source§impl Function for HStackFn
Concatenates arrays horizontally into a single spilled array.
impl Function for HStackFn
Concatenates arrays horizontally into a single spilled array.
HSTACK appends columns from each argument left-to-right.
§Remarks
- All non-empty range arguments must have the same row count.
- Scalar arguments are treated as 1x1 values.
- Mismatched row counts return
#VALUE!. - Empty inputs are skipped; if all inputs are empty, result is an empty spill.
§Examples
title: "Join two 2-row ranges side by side"
grid:
A1: 1
A2: 2
B1: 10
B2: 20
formula: '=HSTACK(A1:A2,B1:B2)'
expected: [[1,10],[2,20]]title: "Append a scalar column"
grid:
A1: "Item"
formula: '=HSTACK(A1,"OK")'
expected: [["Item","OK"]]related:
- VSTACK
- CHOOSECOLS
- TAKE
faq:
- q: "Why does HSTACK return #VALUE! when combining ranges?"
a: "All non-empty inputs must have identical row counts; mismatched heights produce #VALUE!."
- q: "How are scalar arguments treated in HSTACK?"
a: "Each scalar is treated as a 1x1 block, so it only aligns with other arguments when the target row count is 1."[formualizer-docgen:schema:start] Name: HSTACK Type: HStackFn Min args: 1 Max args: variadic Variadic: true Signature: HSTACK(arg1…: range|any@range) Arg schema: arg1{kinds=range|any,required=true,shape=range,by_ref=false,coercion=None,max=None,repeating=Some(1),default=false} 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>
The unified evaluation path. Read more
fn namespace(&self) -> &'static str
fn volatile(&self) -> bool
Source§fn aliases(&self) -> &'static [&'static str]
fn aliases(&self) -> &'static [&'static str]
Optional list of additional alias names (case-insensitive) that should resolve to this
function. Default: empty slice. Implementors can override to expose legacy names.
Returned slice must have ’static lifetime (typically a static array reference).
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>>
Optional reference result path. Only called by the interpreter/engine
when the callsite expects a reference (e.g., range combinators, by-ref
argument positions, or spill sources). Read more
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>
Dispatch to the unified evaluation path with automatic argument validation.
Auto Trait Implementations§
impl Freeze for HStackFn
impl RefUnwindSafe for HStackFn
impl Send for HStackFn
impl Sync for HStackFn
impl Unpin for HStackFn
impl UnsafeUnpin for HStackFn
impl UnwindSafe for HStackFn
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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