# Data Tables

Data Tables bring spreadsheet-like functionality directly into your flowcharts. Add structured data with typed cells, formulas, filtering, conditional formatting, and CSV import, all embedded as a node on your canvas.

## Creating a Data Table

In the flowchart editor, open the **Node Palette** and drag a **Data Table** node onto the canvas. You can also use the toolbar's “Add Data Table” button.

A creation modal lets you set the initial number of rows and columns, and choose column types before the table is placed.

## Cell Types

### Text

Plain text content. The default cell type.

### Number

Numeric values with configurable number formats.

### Currency

Monetary values with locale-aware formatting ($, €, etc.).

### Date

Date values with a date picker for easy selection.

### Checkbox

Boolean toggle. Great for status columns.

### Select

Dropdown with predefined options and color tags.

### URL

Clickable links that open in a new tab.

## Formulas

Start any cell with `=` to enter a formula. A formula helper panel shows available functions as you type.

- SUM  `=SUM(A1:A10)`  Add up a range of cells  
- AVG  `=AVG(B1:B5)`  Calculate the average  
- COUNT  `=COUNT(C1:C20)`  Count non-empty cells  
- MIN / MAX  `=MIN(D1:D10)`  Find the smallest or largest value  
- IF  `=IF(A1>100,"Yes","No")`  Conditional logic  
- VLOOKUP  `=VLOOKUP(E1,A:B,2)`  Look up a value in another column  
- CONCAT  `=CONCAT(A1," ",B1)`  Join text from multiple cells  
- ROUND  `=ROUND(A1,2)`  Round to specified decimal places

## Filtering & Sorting

### Column Filters

Click the filter icon in any column header to filter rows. Supports text contains, equals, greater/less than, date ranges, and checkbox state filters.

### Sorting

Click a column header to sort ascending, click again for descending, and a third time to clear. Works with all cell types.

### Find & Replace

Use `⌘/Ctrl + F` within a selected table to open find & replace. Supports case-sensitive search and regex.

## Conditional Formatting

Apply visual rules to cells based on their values. Right-click a column header → **Conditional Formatting** to set rules like:

- Highlight cells greater than / less than a value
- Color-code based on text content (e.g., "Complete" = green)
- Data bars that fill based on numeric value
- Icon sets (arrows, dots) for visual indicators

## CSV Import

Import data from CSV files. Click the **Import CSV** button in the table header to upload a file. The importer auto-detects column types and lets you preview before confirming.

Supported delimiters: comma, semicolon, tab. UTF-8 encoding recommended.

**Status bar:** When you select cells, a status bar at the bottom shows SUM, AVG, COUNT, MIN, and MAX of the selection in real-time.
