Commit Graph

4 Commits

Author SHA1 Message Date
Atanas Korchev
609622692e Add culture-aware editing, display, and formula entry to RadzenSpreadsheet
The spreadsheet engine parsed typed input with the invariant culture while
displaying values with the current culture, breaking the edit round-trip on
non-en-US hosts and making comma-decimal entry (10,50) impossible.

Workbook gains a Culture property (defaults to CurrentCulture) which the
component stamps from its inherited Culture parameter. It drives:

- Cell input parsing (CellData type inference), including day-month date
  handling for cultures where the group and date separators collide (de-DE)
- Edit text and display rendering (GetValue, GetValueAsString, GetDisplayText)
- Number format rendering - format codes stay canonical invariant tokens while
  separators, month names, and AM/PM designators follow the culture
- Formula entry and display via the new FormulaLocalizer (Excel FormulaLocal
  semantics: ';' argument separators and ',' decimals in comma-decimal
  cultures, lenient comma acceptance where unambiguous, canonical invariant
  storage)
- Dialog input (data validation, conditional format, filter) via shared
  conversion helpers on SpreadsheetDialogBase

XLSX and CSV files read and write canonical invariant values regardless of
the workbook culture, including autofit column widths. Malformed formulas now
surface as error trees instead of an unhandled lexer exception. Number format
parsing is cached (hard-bounded) since CellView reparsed per render.

Includes localization demos for the Spreadsheet and Document Processing
sections and culture test suites.

Note: headless code on non-en-US hosts now parses string values with the
host culture; set Workbook.Culture explicitly (or to InvariantCulture) for
host-independent processing.
2026-07-08 14:54:55 +03:00
Atanas Korchev
7179194877 Add Tier 1 and Tier 2 Excel-compatible formula functions
Add COUNTIF/COUNTIFS, SUMIFS, AVERAGEIF/AVERAGEIFS, MAXIFS/MINIFS, MATCH/XMATCH,
CONCATENATE, ABS, MOD, MEDIAN, IFS, SWITCH, POWER, SQRT, PRODUCT, SUMPRODUCT,
CEILING, FLOOR, STDEV/STDEVP/VAR/VARP (and .S/.P aliases), MODE (and MODE.SNGL),
RANK (and RANK.EQ), COUNTBLANK, IFNA, ISBLANK/ISNUMBER/ISTEXT/ISERROR/ISNA,
DAYS, NETWORKDAYS, WORKDAY, DATEVALUE, EXACT, CHAR, CODE.

Engine support: ParameterType.Group preserves argument boundaries for variadic
range/criteria pairs and arrays; FunctionStore.Add registers dotted-name aliases;
the parser accepts dotted function names; CellData comparisons are case-insensitive
and MatchesCriteria handles =/<> operators and wildcards. Fixes a latent CHOOSE bug
where range arguments were flattened. All function results verified against Excel.
2026-06-15 18:45:18 +03:00
Atanas Korchev
4a70f957c2 Standardize null checks to is null / is not null
Replaced all == null with is null and != null with is not null
across 109 spreadsheet files. The is null pattern uses a direct
reference check that cannot be overridden by operator overloads.
2026-06-15 18:45:05 +03:00
Atanas Korchev
5fc3a52908 Move document-layer files to Radzen.Blazor/Documents/Spreadsheet/
137 files with namespace Radzen.Documents.Spreadsheet now live under
Documents/Spreadsheet/ directory, matching their namespace. 76 function
files in Documents/Spreadsheet/Functions/. 27 UI files remain in
Spreadsheet/.
2026-06-15 18:45:03 +03:00