@particle-academy/fancy-sheets 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -187,31 +187,63 @@ Type `=` in any cell to enter a formula. The engine supports cell references, ra
187
187
  | Comparison | `=A1>10` | Operators: `=`, `<>`, `<`, `>`, `<=`, `>=` |
188
188
  | Concatenation | `=A1&" "&B1` | String join with `&` |
189
189
 
190
- ### Built-in Functions
190
+ ### Built-in Functions (80+)
191
191
 
192
- **Math:**
192
+ **Math (25):**
193
193
 
194
194
  | Function | Example | Description |
195
195
  |----------|---------|-------------|
196
196
  | `SUM` | `=SUM(A1:A10)` | Sum of values |
197
197
  | `AVERAGE` | `=AVERAGE(B1:B5)` | Mean of values |
198
+ | `MEDIAN` | `=MEDIAN(A1:A10)` | Median value |
198
199
  | `MIN` | `=MIN(C1:C10)` | Minimum value |
199
200
  | `MAX` | `=MAX(C1:C10)` | Maximum value |
200
201
  | `COUNT` | `=COUNT(A1:A20)` | Count of numeric values |
202
+ | `PRODUCT` | `=PRODUCT(A1:A5)` | Multiply all values |
201
203
  | `ROUND` | `=ROUND(A1, 2)` | Round to N decimals |
202
204
  | `ABS` | `=ABS(A1)` | Absolute value |
203
-
204
- **Text:**
205
+ | `SQRT` | `=SQRT(A1)` | Square root |
206
+ | `POWER` | `=POWER(2,10)` | Exponentiation |
207
+ | `MOD` | `=MOD(10,3)` | Remainder |
208
+ | `INT` | `=INT(3.7)` | Round down to integer |
209
+ | `TRUNC` | `=TRUNC(3.789,1)` | Truncate decimals |
210
+ | `FLOOR` | `=FLOOR(2.7,1)` | Round down to multiple |
211
+ | `CEILING` | `=CEILING(2.1,1)` | Round up to multiple |
212
+ | `SIGN` | `=SIGN(-5)` | Returns -1, 0, or 1 |
213
+ | `FACT` | `=FACT(5)` | Factorial (120) |
214
+ | `PI` | `=PI()` | 3.14159... |
215
+ | `EXP` | `=EXP(1)` | e^n |
216
+ | `LN` | `=LN(10)` | Natural logarithm |
217
+ | `LOG` | `=LOG(100,10)` | Logarithm (default base 10) |
218
+ | `LOG10` | `=LOG10(1000)` | Base-10 logarithm |
219
+ | `RAND` | `=RAND()` | Random 0-1 |
220
+ | `RANDBETWEEN` | `=RANDBETWEEN(1,100)` | Random integer |
221
+
222
+ **Text (19):**
205
223
 
206
224
  | Function | Example | Description |
207
225
  |----------|---------|-------------|
208
- | `UPPER` | `=UPPER(A1)` | Convert to uppercase |
209
- | `LOWER` | `=LOWER(A1)` | Convert to lowercase |
226
+ | `UPPER` | `=UPPER(A1)` | Uppercase |
227
+ | `LOWER` | `=LOWER(A1)` | Lowercase |
228
+ | `PROPER` | `=PROPER("hello world")` | Title Case |
210
229
  | `LEN` | `=LEN(A1)` | String length |
211
- | `TRIM` | `=TRIM(A1)` | Remove leading/trailing whitespace |
212
- | `CONCAT` | `=CONCAT(A1,B1,C1)` | Join values |
213
-
214
- **Logic:**
230
+ | `TRIM` | `=TRIM(A1)` | Remove whitespace |
231
+ | `LEFT` | `=LEFT(A1,3)` | First N characters |
232
+ | `RIGHT` | `=RIGHT(A1,3)` | Last N characters |
233
+ | `MID` | `=MID(A1,2,3)` | Substring from position |
234
+ | `FIND` | `=FIND("x",A1)` | Case-sensitive position |
235
+ | `SEARCH` | `=SEARCH("x",A1)` | Case-insensitive position |
236
+ | `SUBSTITUTE` | `=SUBSTITUTE(A1,"old","new")` | Replace text |
237
+ | `REPLACE` | `=REPLACE(A1,2,3,"xyz")` | Replace by position |
238
+ | `CONCAT` | `=CONCAT(A1,B1)` | Join values |
239
+ | `REPT` | `=REPT("*",5)` | Repeat string |
240
+ | `EXACT` | `=EXACT(A1,B1)` | Case-sensitive compare |
241
+ | `VALUE` | `=VALUE("42")` | Text to number |
242
+ | `TEXT` | `=TEXT(0.5,"0%")` | Format number as text |
243
+ | `CHAR` | `=CHAR(65)` | Character from code |
244
+ | `CODE` | `=CODE("A")` | Code of first character |
245
+
246
+ **Logic (8):**
215
247
 
216
248
  | Function | Example | Description |
217
249
  |----------|---------|-------------|
@@ -219,6 +251,64 @@ Type `=` in any cell to enter a formula. The engine supports cell references, ra
219
251
  | `AND` | `=AND(A1>0,B1>0)` | All conditions true |
220
252
  | `OR` | `=OR(A1>0,B1>0)` | Any condition true |
221
253
  | `NOT` | `=NOT(A1)` | Negate boolean |
254
+ | `IFERROR` | `=IFERROR(A1/B1,0)` | Fallback on error |
255
+ | `IFBLANK` | `=IFBLANK(A1,"N/A")` | Fallback if empty |
256
+ | `SWITCH` | `=SWITCH(A1,1,"One",2,"Two")` | Multi-case conditional |
257
+ | `CHOOSE` | `=CHOOSE(2,"a","b","c")` | Select by index |
258
+
259
+ **Conditional Aggregates (8):**
260
+
261
+ | Function | Example | Description |
262
+ |----------|---------|-------------|
263
+ | `SUMIF` | `=SUMIF(A1:A10,">5",B1:B10)` | Conditional sum |
264
+ | `SUMIFS` | `=SUMIFS(C1:C10,A1:A10,">5",B1:B10,"<10")` | Multi-criteria sum |
265
+ | `COUNTIF` | `=COUNTIF(A1:A10,"Yes")` | Conditional count |
266
+ | `COUNTIFS` | `=COUNTIFS(A1:A10,">5",B1:B10,"<10")` | Multi-criteria count |
267
+ | `AVERAGEIF` | `=AVERAGEIF(A1:A10,">0")` | Conditional average |
268
+ | `AVERAGEIFS` | `=AVERAGEIFS(C1:C10,A1:A10,">5")` | Multi-criteria average |
269
+ | `MINIFS` | `=MINIFS(C1:C10,A1:A10,">5")` | Conditional min |
270
+ | `MAXIFS` | `=MAXIFS(C1:C10,A1:A10,">5")` | Conditional max |
271
+
272
+ **Lookup (8):**
273
+
274
+ | Function | Example | Description |
275
+ |----------|---------|-------------|
276
+ | `VLOOKUP` | `=VLOOKUP(key,A1:C10,3)` | Vertical lookup |
277
+ | `HLOOKUP` | `=HLOOKUP(key,A1:Z3,2)` | Horizontal lookup |
278
+ | `INDEX` | `=INDEX(A1:A10,3)` | Value at position |
279
+ | `MATCH` | `=MATCH("x",A1:A10)` | Find position of value |
280
+ | `ROWS` | `=ROWS(A1:A10)` | Count rows in range |
281
+ | `COLUMNS` | `=COLUMNS(A1:C1)` | Count columns in range |
282
+ | `ROW` | `=ROW(A5)` | Row number |
283
+ | `COLUMN` | `=COLUMN(C1)` | Column number |
284
+
285
+ **Date/Time (12):**
286
+
287
+ | Function | Example | Description |
288
+ |----------|---------|-------------|
289
+ | `TODAY` | `=TODAY()` | Current date (serial) |
290
+ | `NOW` | `=NOW()` | Current date+time (serial) |
291
+ | `DATE` | `=DATE(2024,6,15)` | Create date |
292
+ | `YEAR` | `=YEAR(A1)` | Extract year |
293
+ | `MONTH` | `=MONTH(A1)` | Extract month |
294
+ | `DAY` | `=DAY(A1)` | Extract day |
295
+ | `HOUR` | `=HOUR(A1)` | Extract hour |
296
+ | `MINUTE` | `=MINUTE(A1)` | Extract minute |
297
+ | `SECOND` | `=SECOND(A1)` | Extract second |
298
+ | `WEEKDAY` | `=WEEKDAY(A1)` | Day of week (1-7) |
299
+ | `DATEDIF` | `=DATEDIF(A1,B1,"M")` | Date difference |
300
+ | `EDATE` | `=EDATE(A1,3)` | Date + N months |
301
+
302
+ **Info (6):**
303
+
304
+ | Function | Example | Description |
305
+ |----------|---------|-------------|
306
+ | `ISBLANK` | `=ISBLANK(A1)` | Is empty |
307
+ | `ISNUMBER` | `=ISNUMBER(A1)` | Is numeric |
308
+ | `ISTEXT` | `=ISTEXT(A1)` | Is text |
309
+ | `ISERROR` | `=ISERROR(A1)` | Is error value |
310
+ | `ISLOGICAL` | `=ISLOGICAL(A1)` | Is boolean |
311
+ | `TYPE` | `=TYPE(A1)` | Type code (1=num, 2=text, 4=bool, 16=error) |
222
312
 
223
313
  ### Custom Functions
224
314