XenevaOS
Loading...
Searching...
No Matches
sheet_eval.h
Go to the documentation of this file.
1
6#ifndef __SHEET_EVAL_H__
7#define __SHEET_EVAL_H__
8
9#include "sheet_types.h"
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
15/* Convert column index (0..25) and row index (0..99) to A1 string */
16void SheetCoordToString(int col, int row, char* buf, int maxLen);
17
18/* Parse cell reference token (e.g. "A1", "C25") into col and row indices.
19 * Returns length of parsed token, or 0 if invalid. */
20int SheetParseCellRef(const char* str, int* outCol, int* outRow);
21
22/* Parse range token (e.g. "A1:B10") into start and end coords.
23 * Returns length of parsed token, or 0 if invalid. */
24int SheetParseRange(const char* str, SheetRange* outRange);
25
26/* Evaluate a single cell's formula or value in the given sheet tab */
27void SheetEvaluateCell(SheetTab* tab, int row, int col);
28
29/* Evaluate all cells in the sheet tab with dependency resolution & cycle detection */
30void SheetEvaluateAll(SheetTab* tab);
31
32/* Format numeric value into human-readable spreadsheet string */
33void SheetFormatNumber(double val, char* buf, int maxLen);
34
35/* Compute range statistics (SUM, AVG, MIN, MAX, COUNT) for selected cells */
36void SheetComputeStats(SheetTab* tab, const SheetRange* range, SheetStats* outStats);
37
38#ifdef __cplusplus
39}
40#endif
41
42#endif /* __SHEET_EVAL_H__ */
int SheetParseCellRef(const char *str, int *outCol, int *outRow)
Definition sheet_eval.cpp:28
void SheetEvaluateCell(SheetTab *tab, int row, int col)
Definition sheet_eval.cpp:393
void SheetFormatNumber(double val, char *buf, int maxLen)
Definition sheet_eval.cpp:72
void SheetEvaluateAll(SheetTab *tab)
Definition sheet_eval.cpp:460
void SheetComputeStats(SheetTab *tab, const SheetRange *range, SheetStats *outStats)
Definition sheet_eval.cpp:476
int SheetParseRange(const char *str, SheetRange *outRange)
Definition sheet_eval.cpp:49
void SheetCoordToString(int col, int row, char *buf, int maxLen)
Definition sheet_eval.cpp:18
Core types, constants, and limits for XESheets spreadsheet application.
Definition sheet_types.h:87
Definition sheet_types.h:95
Definition sheet_types.h:63