Posted 29 December 2025, 8:12 am EST
- Updated 29 December 2025, 8:17 am EST
Hi Jean,
We can replicate that in the current SpreadJS implementation; TableSheet only exposes the data region to the formula engine (for example, TableSheetName[#Data]). The column headers (captions) are treated as schema metadata, and accessing them results in the #REF! error, which is why TableSheetName[#Headers] does not work.
There is no built-in formula syntax to directly return all TableSheet column names.
As a workaround, this can be achieved by:
- Retrieving the TableSheet column captions via the TableSheet API in JavaScript and writing them into a helper range or named range, or
- Defining a custom formula function that takes the TableSheet name and returns the column captions as a dynamic array.
Please refer to the code sample below that demonstrates how to retrieve the column names from the TableSheet using a custom function.
We’ve also shared this feedback with our development team for any enhancement considerations under the internal tracking ID SJS-33181.
Kind Regards,
Chirag
Attachment: https://jscodemine.mescius.io/share/ieviIEk1bk67wq1Rt7tq0w
Working:
