spreadsheet-ods-formula 1.0.0

Create ods-formulas for use with spreadsheet-ods.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
//! 
//! Information functions provide information about a data value, the 
//! spreadsheet, or underlying environment, including special functions for 
//! converting between data types.

use crate::*;
#[allow(unused_imports)]
use crate::info::*;

/// Returns the number of areas in a given list of references.
///
/// [documentfoundation->AREAS](https://wiki.documentfoundation.org/Documentation/Calc_Functions/AREAS)
///
/// __Syntax__: 
/// ```ods
///     AREAS( R: ReferenceList )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// Returns the number of areas in the reference list R.
///
/// __See also__: [crate::of::infix operator reference concatenation()], [crate::of::index()], 
#[inline]
pub fn areas<A: Reference>(r: A) -> FnNumber1<A> {
    FnNumber1("AREAS", r)
}

/// Returns information about position, formatting or contents in a reference.
///
/// [documentfoundation->CELL](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CELL)
///
/// __Syntax__: 
/// ```ods
///     CELL( Info_Type: Text )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// The parameters are
/// 
/// •Info_Type: the text string which specifies the type of information. 
/// Please refer to Table 17 - CELL.
/// 
/// •R : if R is a reference to a cell, it is the cell whose information will 
/// be returned; if R is a reference to a range, the top-left cell in the range 
/// is the selected one; if R is omitted, the current cell is used.
///
/// __See also__: [crate::of::cell_()], 
#[inline]
pub fn cell<>(info_type: CellInfo) -> FnAny1<CellInfo> {
    FnAny1("CELL", info_type)
}

/// Returns information about position, formatting or contents in a reference.
///
/// [documentfoundation->CELL](https://wiki.documentfoundation.org/Documentation/Calc_Functions/CELL)
///
/// __Syntax__: 
/// ```ods
///     CELL( Info_Type: Text; R: Reference )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// The parameters are
/// 
/// •Info_Type: the text string which specifies the type of information. 
/// Please refer to Table 17 - CELL.
/// 
/// •R : if R is a reference to a cell, it is the cell whose information will 
/// be returned; if R is a reference to a range, the top-left cell in the range 
/// is the selected one; if R is omitted, the current cell is used.
///
/// __See also__: [crate::of::cell()], 
#[inline]
pub fn cell_<A: Reference>(info_type: CellInfo, r: A) -> FnAny2<CellInfo, A> {
    FnAny2("CELL", info_type, r)
}

/// Returns the column number(s) of a reference.
///
/// [documentfoundation->COLUMN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COLUMN)
///
/// __Syntax__: 
/// ```ods
///     COLUMN( )
/// ```
///
/// __Constraints__:
/// AREAS(R) = 1
///
/// __Semantics__:
/// Returns the column number of a reference, where “A” is 1, “B” is 2, 
/// and so on. If no parameter is given, the current cell is used. If a 
/// reference has multiple columns, an array of numbers is returned with all of 
/// the columns in the reference.
///
/// __See also__: [crate::of::areas()], [crate::of::row()], [crate::of::sheet()], [crate::of::column_()], 
#[inline]
pub fn column() -> FnNumber0 {
    FnNumber0("COLUMN", )
}

/// Returns the column number(s) of a reference.
///
/// [documentfoundation->COLUMN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COLUMN)
///
/// __Syntax__: 
/// ```ods
///     COLUMN( R: Reference )
/// ```
///
/// __Constraints__:
/// AREAS(R) = 1
///
/// __Semantics__:
/// Returns the column number of a reference, where “A” is 1, “B” is 2, 
/// and so on. If no parameter is given, the current cell is used. If a 
/// reference has multiple columns, an array of numbers is returned with all of 
/// the columns in the reference.
///
/// __See also__: [crate::of::areas()], [crate::of::row()], [crate::of::sheet()], [crate::of::column()], 
#[inline]
pub fn column_<A: Reference>(r: A) -> FnNumber1<A> {
    FnNumber1("COLUMN", r)
}

/// Returns the number of columns in a given range.
///
/// [documentfoundation->COLUMNS](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COLUMNS)
///
/// __Syntax__: 
/// ```ods
///     COLUMNS( R: Reference|Array )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// Returns the number of columns in the range or array specified. The result 
/// is not dependent on the cell content in the range.
///
/// __See also__: [crate::of::rows()], 
#[inline]
pub fn columns<A: ReferenceOrArray>(r: A) -> FnNumber1<A> {
    FnNumber1("COLUMNS", r)
}

/// Count the number of Numbers provided.
///
/// [documentfoundation->COUNT](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COUNT)
///
/// __Syntax__: 
/// ```ods
///     COUNT({ N: NumberSequenceList}+ )
/// ```
///
/// __Constraints__:
/// One or more parameters.
///
/// __Semantics__:
/// Counts the numbers in the list N. Only numbers in references are counted; 
/// all other types are ignored. Errors are not propagated. It is 
/// implementation-defined what happens if 0 parameters are passed, but it 
/// should be an Error or 0.
///
/// __See also__: [crate::of::counta()], 
#[inline]
pub fn count<A: Sequence>(n: A) -> FnNumber1<A> {
    FnNumber1("COUNT", n)
}

/// Count the number of non-empty values.
///
/// [documentfoundation->COUNTA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COUNTA)
///
/// __Syntax__: 
/// ```ods
///     COUNTA({ AnyValue: Any}+ )
/// ```
///
/// __Constraints__:
/// None.
///
/// __Semantics__:
/// Counts the number of non-blank values. A value is non-blank if it contains 
/// any content of any type, including an Error. In a reference, every cell 
/// that is not empty is included in the count. An empty string value ("") is 
/// not considered blank. Errors contained in a range are considered a 
/// non-blank value for purposes of the count; errors do not propagate. 
/// Constant expressions or formulas are allowed; these are evaluated and if 
/// they produce an Error value the Error value is counted as one non-blank 
/// value (and not propagated as an Error). It is implementation-defined what 
/// happens if 0 parameters are passed, but it should be an Error or 0.
///
/// __See also__: [crate::of::count()], [crate::of::isblank()], 
#[inline]
pub fn counta<A: Sequence>(any_value: A) -> FnNumber1<A> {
    FnNumber1("COUNTA", any_value)
}

/// Count the number of blank cells.
///
/// [documentfoundation->COUNTBLANK](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COUNTBLANK)
///
/// __Syntax__: 
/// ```ods
///     COUNTBLANK( R: ReferenceList )
/// ```
///
/// __Constraints__:
/// None.
///
/// __Semantics__:
/// Counts the number of blank cells in R. A cell is blank if the cell is empty 
/// for purposes of COUNTBLANK. If ISBLANK(R) is TRUE, then it is blank. A cell 
/// with numeric value zero ('0') is not blank. It is implementation-defined 
/// whether or not a cell returning the empty string ("") is considered blank; 
/// because of this, there is a (potential) subtle difference between 
/// COUNTBLANK and ISBLANK.
/// 
/// Evaluators shall support one Reference as a parameter and may support a 
/// ReferenceList as a parameter.
///
/// __See also__: [crate::of::count()], [crate::of::counta()], [crate::of::countif()], [crate::of::isblank()], 
#[inline]
pub fn countblank<A: Reference>(r: A) -> FnNumber1<A> {
    FnNumber1("COUNTBLANK", r)
}

/// Count the number of cells in a range that meet a criteria.
///
/// [documentfoundation->COUNTIF](https://wiki.documentfoundation.org/Documentation/Calc_Functions/COUNTIF)
///
/// __Syntax__: 
/// ```ods
///     COUNTIF( R: ReferenceList; C: Criterion )
/// ```
///
/// __Constraints__:
/// Does not accept constant values as the reference parameter.
///
/// __Semantics__:
/// Counts the number of cells in the reference range R that meet the Criterion 
/// C (4.11.8).
/// 
/// The values returned may vary depending upon the 
/// HOST-USE-REGULAR-EXPRESSIONS or HOST-USE-WILDCARDS or 
/// HOST-SEARCH-CRITERIA-MUST-APPLY-TO-WHOLE-CELL properties. 3.4
///
/// __See also__: [crate::of::count()], [crate::of::counta()], [crate::of::countblank()], [crate::of::countifs()], [crate::of::sumif()], [crate::of::infix operator "="()], [crate::of::infix operator "<>"()], [crate::of::infix operator ordered comparison ("<", "<=", ">", ">=")()], 
#[inline]
pub fn countif<A: Reference, B: Criterion>(r: A, c: B) -> FnNumber2<A, B> {
    FnNumber2("COUNTIF", r, c)
}

/// Returns Number representing the specific Error type.
///
/// [documentfoundation->ERROR.TYPE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ERROR.TYPE)
///
/// __Syntax__: 
/// ```ods
///     ERROR.TYPE( E: Error )
/// ```
///
/// __Constraints__:
/// None.
///
/// __Semantics__:
/// Returns a number representing what kind of Error has occurred. Note that 
/// unlike most functions, this function does not propagate Error values. 
/// Receiving a non-Error value returns an Error. In particular, 
/// ERROR.TYPE(NA()) returns 7, and ERROR.TYPE applied to a non-Error returns 
/// an Error.
///
/// __See also__: [crate::of::na()], 
#[inline]
pub fn error_type<A: Any>(e: A) -> FnNumber1<A> {
    FnNumber1("ERROR.TYPE", e)
}

/// Returns formula at given reference as text.
///
/// [documentfoundation->FORMULA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/FORMULA)
///
/// __Syntax__: 
/// ```ods
///     FORMULA( X: Reference )
/// ```
///
/// __Constraints__:
/// Reference X shall contain a formula.
///
/// __Semantics__:
/// Returns the formula in reference X as a string. The specific syntax of this 
/// returned string is implementation-defined. This function is intended to aid 
/// debugging by simplifying display of formulas in other cells. Error results 
/// of the referred formula cell are not propagated.
///
/// __See also__: [crate::of::isformula()], 
#[inline]
pub fn formula<A: Reference>(x: A) -> FnText1<A> {
    FnText1("FORMULA", x)
}

/// Returns information about the environment.
///
/// [documentfoundation->INFO](https://wiki.documentfoundation.org/Documentation/Calc_Functions/INFO)
///
/// __Syntax__: 
/// ```ods
///     INFO( Category: Text )
/// ```
///
/// __Constraints__:
/// Category shall be valid.
///
/// __Semantics__:
/// Returns information about the environment in the given category.
///
/// __See also__: [crate::of::cell()], 
#[inline]
pub fn info<>(category: InfoInfo) -> FnAny1<InfoInfo> {
    FnAny1("INFO", category)
}

/// Return TRUE if the referenced cell is blank, else return FALSE.
///
/// [documentfoundation->ISBLANK](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISBLANK)
///
/// __Syntax__: 
/// ```ods
///     ISBLANK( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Number, Text, or Logical, return FALSE. If X is a reference 
/// to a cell, examine the cell; if it is blank (has no value), return TRUE, 
/// but if it has a value, return FALSE. A cell with the empty string is not 
/// considered blank. This function does not propagate Error values.
///
/// __See also__: [crate::of::isnumber()], [crate::of::istext()], 
#[inline]
pub fn isblank<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISBLANK", x)
}

/// Return TRUE if the parameter has type Error and is not #N/A, else return 
/// FALSE.
///
/// [documentfoundation->ISERR](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISERR)
///
/// __Syntax__: 
/// ```ods
///     ISERR( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Error, and ISNA(X) is not true, returns TRUE. Otherwise it 
/// returns FALSE. Note that this function returns FALSE if given #N/A; if this 
/// is not desired, use ISERROR 6.13.16. Note that this function does not 
/// propagate Error values.
/// 
/// ISERR(X) is the same as:
/// 
/// IF(ISNA(X),FALSE(),ISERROR(X))
///
/// __See also__: [crate::of::error_type()], [crate::of::iserror()], [crate::of::isna()], [crate::of::isnumber()], [crate::of::istext()], [crate::of::na()], 
#[inline]
pub fn iserr<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISERR", x)
}

/// Return TRUE if the parameter has type Error, else return FALSE.
///
/// [documentfoundation->ISERROR](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISERROR)
///
/// __Syntax__: 
/// ```ods
///     ISERROR( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Error, returns TRUE, else returns FALSE. Note that this 
/// function returns TRUE if given #N/A; if this is not desired, use ISERR 
/// 6.13.15. Note that this function does not propagate Error values.
///
/// __See also__: [crate::of::error_type()], [crate::of::iserr()], [crate::of::isna()], [crate::of::isnumber()], [crate::of::istext()], [crate::of::na()], 
#[inline]
pub fn iserror<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISERROR", x)
}

/// Return TRUE if the value is even, else return FALSE.
///
/// [documentfoundation->ISEVEN](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISEVEN)
///
/// __Syntax__: 
/// ```ods
///     ISEVEN( X: Number )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// First, compute X1 = TRUNC(X). Then, if X1 is even (a division by 2 has a 
/// remainder of 0), return TRUE, else return FALSE. The result is 
/// implementation-defined if given a Logical value; an evaluator may return 
/// either an Error or the result of converting the Logical value to a Number 
/// (per Conversion to Number 6.3.5 ).
///
/// __See also__: [crate::of::isodd()], [crate::of::trunc()], 
#[inline]
pub fn iseven<A: Number>(x: A) -> FnLogical1<A> {
    FnLogical1("ISEVEN", x)
}

/// Return TRUE if the reference refers to a formula, else return FALSE.
///
/// [documentfoundation->ISFORMULA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISFORMULA)
///
/// __Syntax__: 
/// ```ods
///     ISFORMULA( X: Reference )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X refers to a cell whose value is computed by a formula, return TRUE, 
/// else return FALSE. A formula itself may compute a constant; in that case it 
/// will still return TRUE since it is still a formula. Passing a 
/// non-reference, or a reference to more than one cell, is 
/// implementation-defined. This function does not propagate Error values.
///
/// __See also__: [crate::of::istext()], [crate::of::isnumber()], 
#[inline]
pub fn isformula<A: Reference>(x: A) -> FnLogical1<A> {
    FnLogical1("ISFORMULA", x)
}

/// Return TRUE if the parameter has type Logical, else return FALSE.
///
/// [documentfoundation->ISLOGICAL](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISLOGICAL)
///
/// __Syntax__: 
/// ```ods
///     ISLOGICAL( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Logical, returns TRUE, else FALSE. Evaluators that do not 
/// have a distinct Logical type will return the same value ISNUMBER(X) would 
/// return. This function does not propagate Error values.
///
/// __See also__: [crate::of::istext()], [crate::of::isnumber()], 
#[inline]
pub fn islogical<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISLOGICAL", x)
}

/// Return TRUE if the parameter has type Error and is #N/A, else return FALSE.
///
/// [documentfoundation->ISNA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISNA)
///
/// __Syntax__: 
/// ```ods
///     ISNA( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is #N/A, return TRUE, else return FALSE. Note that if X is a 
/// reference, the value being referenced is considered. This function does not 
/// propagate Error values.
///
/// __See also__: [crate::of::error_type()], [crate::of::iserror()], [crate::of::iserr()], [crate::of::isnumber()], [crate::of::istext()], [crate::of::na()], 
#[inline]
pub fn isna<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISNA", x)
}

/// Return TRUE if the parameter does not have type Text, else return FALSE.
///
/// [documentfoundation->ISNONTEXT](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISNONTEXT)
///
/// __Syntax__: 
/// ```ods
///     ISNONTEXT( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Text, ISNONTEXT returns FALSE, else TRUE. If X is a 
/// reference, it examines what X references. References to empty cells are not 
/// considered text, so for reference to an empty cell ISNONTEXT will return 
/// TRUE. Empty Cell 4.7 This function does not propagate Error values.
/// 
/// ISNONTEXT(X) is equivalent to NOT(ISTEXT(X))
///
/// __See also__: [crate::of::isnumber()], [crate::of::islogical()], [crate::of::istext()], [crate::of::not()], 
#[inline]
pub fn isnontext<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISNONTEXT", x)
}

/// Return TRUE if the parameter has type Number, else return FALSE.
///
/// [documentfoundation->ISNUMBER](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISNUMBER)
///
/// __Syntax__: 
/// ```ods
///     ISNUMBER( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Number, returns TRUE, else FALSE. Evaluators need not have 
/// a distinguished Logical type; in such evaluators, ISNUMBER(TRUE()) is TRUE. 
/// This function does not propagate Error values.
///
/// __See also__: [crate::of::istext()], [crate::of::islogical()], 
#[inline]
pub fn isnumber<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISNUMBER", x)
}

/// Return TRUE if the value is even, else return FALSE.
///
/// [documentfoundation->ISODD](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISODD)
///
/// __Syntax__: 
/// ```ods
///     ISODD( X: Number )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// First, compute X1 = TRUNC(X). Then, if X1 is odd (a division by 2 has a 
/// remainder of 1), return TRUE, else return FALSE. The result is 
/// implementation-defined if given a Logical value; an evaluator may return 
/// either an Error or the result of converting the Logical value to a Number 
/// (per Conversion to Number 6.3.5 ).
///
/// __See also__: [crate::of::iseven()], [crate::of::trunc()], 
#[inline]
pub fn isodd<A: Number>(x: A) -> FnLogical1<A> {
    FnLogical1("ISODD", x)
}

/// Return TRUE if the parameter is of type reference, else return FALSE.
///
/// [documentfoundation->ISREF](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISREF)
///
/// __Syntax__: 
/// ```ods
///     ISREF( X: Any )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Reference or ReferenceList, return TRUE, else return FALSE. 
/// Note that unlike nearly all other functions, when given a reference this 
/// function does not then examine the value being referenced. Some functions 
/// and operators return references, and thus ISREF will return TRUE when given 
/// their results. X may be a ReferenceList, in which case ISREF returns TRUE. 
/// This function does not propagate Error values.
///
/// __See also__: [crate::of::isnumber()], [crate::of::istext()], 
#[inline]
pub fn isref<A: Any>(x: A) -> FnLogical1<A> {
    FnLogical1("ISREF", x)
}

/// Return TRUE if the parameter has type Text, else return FALSE.
/// 
/// ISTEXT(X) is equivalent to NOT(ISNONTEXT(X)).
///
/// [documentfoundation->ISTEXT](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ISTEXT)
///
/// __Syntax__: 
/// ```ods
///     ISTEXT( X: Scalar )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is of type Text, returns TRUE, else FALSE. References to empty cells 
/// are NOT considered Text. If X is a reference, examines what X references. 
/// References to empty cells are NOT considered Text, so a reference to an 
/// empty cell will return FALSE. Empty Cell 4.7 This function does not 
/// propagate Error values.
///
/// __See also__: [crate::of::isnontext()], [crate::of::isnumber()], [crate::of::islogical()], 
#[inline]
pub fn istext<A: Scalar>(x: A) -> FnLogical1<A> {
    FnLogical1("ISTEXT", x)
}

/// Return the number of a value.
///
/// [documentfoundation->N](https://wiki.documentfoundation.org/Documentation/Calc_Functions/N)
///
/// __Syntax__: 
/// ```ods
///     N( X: Any )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// If X is a Reference, it is first dereferenced to a scalar. Then its type is 
/// examined. If it is of type Number, it is returned. If it is of type 
/// Logical, 1 is returned if TRUE else 0 is returned. It is 
/// implementation-defined what happens if it is provided a Text value.
///
/// __See also__: [crate::of::t()], [crate::of::value()], 
#[inline]
pub fn n<A: Any>(x: A) -> FnNumber1<A> {
    FnNumber1("N", x)
}

/// Return the constant Error value #N/A.
///
/// [documentfoundation->NA](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NA)
///
/// __Syntax__: 
/// ```ods
///     NA( )
/// ```
///
/// __Constraints__:
/// Shall have 0 parameters
///
/// __Semantics__:
/// This function takes no arguments and returns the Error #N/A.
///
/// __See also__: [crate::of::error_type()], [crate::of::iserror()], 
#[inline]
pub fn na() -> FnAny0 {
    FnAny0("NA", )
}

/// Convert text to number, in a locale-independent way.
///
/// [documentfoundation->NUMBERVALUE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NUMBERVALUE)
///
/// __Syntax__: 
/// ```ods
///     NUMBERVALUE( X: Text )
/// ```
///
/// __Constraints__:
/// LEN(DecimalSeparator) = 1, DecimalSeparator shall not appear in 
/// GroupSeparator
///
/// __Semantics__:
/// Converts given Text value X into Number. If X is a Reference, it is first 
/// dereferenced.
/// 
/// X is transformed according to the following rules:
/// 
/// 1.Starting from the beginning, remove all occurrences of the group 
/// separator before any decimal separator
/// 
/// 2.Starting from the beginning, replace the first occurrence in the text of 
/// the decimal separator character with the FULL STOP (U+002E) character
/// 
/// 3.Remove all whitespace characters (5.14).
/// 
/// 4.If the first character of the resulting string is a period FULL STOP 
/// (U+002E) then prepend a zero
/// 
/// 5.If the string ends in one or more instances of PERCENT SIGN (U+0025) , 
/// remove the percent sign(s)
/// 
/// If percent signs were removed in step 5, divide the value of the returned 
/// number by 100 for each percent sign removed. If the resulting string is a 
/// valid xsd:float, then return the number corresponding to that string, 
/// according to the definition provided in XML Schema, Part 2, Section 3.2.4.
/// 
/// If the string is not a valid xsd:float then return an error.
///
/// __See also__: [crate::of::n()], [crate::of::t()], [crate::of::datevalue()], [crate::of::timevalue()], [crate::of::value()], [crate::of::numbervalue_()], [crate::of::numbervalue__()], 
#[inline]
pub fn numbervalue<A: Text>(x: A) -> FnNumber1<A> {
    FnNumber1("NUMBERVALUE", x)
}

/// Convert text to number, in a locale-independent way.
///
/// [documentfoundation->NUMBERVALUE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NUMBERVALUE)
///
/// __Syntax__: 
/// ```ods
///     NUMBERVALUE( X: Text; DecimalSeparator: Text )
/// ```
///
/// __Constraints__:
/// LEN(DecimalSeparator) = 1, DecimalSeparator shall not appear in 
/// GroupSeparator
///
/// __Semantics__:
/// Converts given Text value X into Number. If X is a Reference, it is first 
/// dereferenced.
/// 
/// X is transformed according to the following rules:
/// 
/// 1.Starting from the beginning, remove all occurrences of the group 
/// separator before any decimal separator
/// 
/// 2.Starting from the beginning, replace the first occurrence in the text of 
/// the decimal separator character with the FULL STOP (U+002E) character
/// 
/// 3.Remove all whitespace characters (5.14).
/// 
/// 4.If the first character of the resulting string is a period FULL STOP 
/// (U+002E) then prepend a zero
/// 
/// 5.If the string ends in one or more instances of PERCENT SIGN (U+0025) , 
/// remove the percent sign(s)
/// 
/// If percent signs were removed in step 5, divide the value of the returned 
/// number by 100 for each percent sign removed. If the resulting string is a 
/// valid xsd:float, then return the number corresponding to that string, 
/// according to the definition provided in XML Schema, Part 2, Section 3.2.4.
/// 
/// If the string is not a valid xsd:float then return an error.
///
/// __See also__: [crate::of::n()], [crate::of::t()], [crate::of::datevalue()], [crate::of::timevalue()], [crate::of::value()], [crate::of::numbervalue()], [crate::of::numbervalue__()], 
#[inline]
pub fn numbervalue_<A: Text, B: Text>(x: A, decimal_separator: B) -> FnNumber2<A, B> {
    FnNumber2("NUMBERVALUE", x, decimal_separator)
}

/// Convert text to number, in a locale-independent way.
///
/// [documentfoundation->NUMBERVALUE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/NUMBERVALUE)
///
/// __Syntax__: 
/// ```ods
///     NUMBERVALUE( X: Text; DecimalSeparator: Text; GroupSeparator: Text )
/// ```
///
/// __Constraints__:
/// LEN(DecimalSeparator) = 1, DecimalSeparator shall not appear in 
/// GroupSeparator
///
/// __Semantics__:
/// Converts given Text value X into Number. If X is a Reference, it is first 
/// dereferenced.
/// 
/// X is transformed according to the following rules:
/// 
/// 1.Starting from the beginning, remove all occurrences of the group 
/// separator before any decimal separator
/// 
/// 2.Starting from the beginning, replace the first occurrence in the text of 
/// the decimal separator character with the FULL STOP (U+002E) character
/// 
/// 3.Remove all whitespace characters (5.14).
/// 
/// 4.If the first character of the resulting string is a period FULL STOP 
/// (U+002E) then prepend a zero
/// 
/// 5.If the string ends in one or more instances of PERCENT SIGN (U+0025) , 
/// remove the percent sign(s)
/// 
/// If percent signs were removed in step 5, divide the value of the returned 
/// number by 100 for each percent sign removed. If the resulting string is a 
/// valid xsd:float, then return the number corresponding to that string, 
/// according to the definition provided in XML Schema, Part 2, Section 3.2.4.
/// 
/// If the string is not a valid xsd:float then return an error.
///
/// __See also__: [crate::of::n()], [crate::of::t()], [crate::of::datevalue()], [crate::of::timevalue()], [crate::of::value()], [crate::of::numbervalue()], [crate::of::numbervalue_()], 
#[inline]
pub fn numbervalue__<A: Text, B: Text, C: Text>(x: A, decimal_separator: B, group_separator: C) -> FnNumber3<A, B, C> {
    FnNumber3("NUMBERVALUE", x, decimal_separator, group_separator)
}

/// Returns the row number(s) of a reference.
///
/// [documentfoundation->ROW](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ROW)
///
/// __Syntax__: 
/// ```ods
///     ROW( )
/// ```
///
/// __Constraints__:
/// AREAS(R) = 1
///
/// __Semantics__:
/// Returns the row number of a reference. If no parameter is given, the 
/// current cell is used. If a reference has multiple rows, an array of numbers 
/// is returned with all of the rows in the reference.
///
/// __See also__: [crate::of::areas()], [crate::of::column()], [crate::of::sheet()], [crate::of::row_()], 
#[inline]
pub fn row() -> FnNumber0 {
    FnNumber0("ROW", )
}

/// Returns the row number(s) of a reference.
///
/// [documentfoundation->ROW](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ROW)
///
/// __Syntax__: 
/// ```ods
///     ROW( R: Reference )
/// ```
///
/// __Constraints__:
/// AREAS(R) = 1
///
/// __Semantics__:
/// Returns the row number of a reference. If no parameter is given, the 
/// current cell is used. If a reference has multiple rows, an array of numbers 
/// is returned with all of the rows in the reference.
///
/// __See also__: [crate::of::areas()], [crate::of::column()], [crate::of::sheet()], [crate::of::row()], 
#[inline]
pub fn row_<A: Reference>(r: A) -> FnNumber1<A> {
    FnNumber1("ROW", r)
}

/// Returns the number of rows in a given range.
///
/// [documentfoundation->ROWS](https://wiki.documentfoundation.org/Documentation/Calc_Functions/ROWS)
///
/// __Syntax__: 
/// ```ods
///     ROWS( R: Reference|Array )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// The result is not dependent on the cell content in the range.
///
/// __See also__: [crate::of::columns()], 
#[inline]
pub fn rows<A: ReferenceOrArray>(r: A) -> FnNumber1<A> {
    FnNumber1("ROWS", r)
}

/// Returns the sheet number of the reference or the string representing a 
/// sheet name.
///
/// [documentfoundation->SHEET](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SHEET)
///
/// __Syntax__: 
/// ```ods
///     SHEET( )
/// ```
///
/// __Constraints__:
/// R shall not contain a Source Location (5.8 References)
///
/// __Semantics__:
/// Returns the 1-based sheet number of the given reference or sheet name.
/// 
/// Hidden sheets are not excluded from the sheet count.
/// 
/// If no parameter is given, the result is the sheet number of the sheet 
/// containing the formula.
/// 
/// If a Reference is given it is not dereferenced.
/// 
/// If the reference encompasses more than one sheet, the result is the number 
/// of the first sheet in the range.
/// 
/// If a reference does not contain a sheet reference, the result is the sheet 
/// number of the sheet containing the formula.
/// 
/// If the function is not evaluated within a table cell, an error is returned.
///
/// __See also__: [crate::of::column()], [crate::of::row()], [crate::of::sheets()], [crate::of::sheet_()], 
#[inline]
pub fn sheet() -> FnNumber0 {
    FnNumber0("SHEET", )
}

/// Returns the sheet number of the reference or the string representing a 
/// sheet name.
///
/// [documentfoundation->SHEET](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SHEET)
///
/// __Syntax__: 
/// ```ods
///     SHEET( R: Text|Reference )
/// ```
///
/// __Constraints__:
/// R shall not contain a Source Location (5.8 References)
///
/// __Semantics__:
/// Returns the 1-based sheet number of the given reference or sheet name.
/// 
/// Hidden sheets are not excluded from the sheet count.
/// 
/// If no parameter is given, the result is the sheet number of the sheet 
/// containing the formula.
/// 
/// If a Reference is given it is not dereferenced.
/// 
/// If the reference encompasses more than one sheet, the result is the number 
/// of the first sheet in the range.
/// 
/// If a reference does not contain a sheet reference, the result is the sheet 
/// number of the sheet containing the formula.
/// 
/// If the function is not evaluated within a table cell, an error is returned.
///
/// __See also__: [crate::of::column()], [crate::of::row()], [crate::of::sheets()], [crate::of::sheet()], 
#[inline]
pub fn sheet_<A: TextOrReference>(r: A) -> FnNumber1<A> {
    FnNumber1("SHEET", r)
}

/// Returns the number of sheets in a reference or current document.
///
/// [documentfoundation->SHEETS](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SHEETS)
///
/// __Syntax__: 
/// ```ods
///     SHEETS( )
/// ```
///
/// __Constraints__:
/// R shall not contain a Source Location (5.8 References)
///
/// __Semantics__:
/// Returns the number of sheets in the given reference.
/// 
/// If no parameter is given, the number of sheets in the document is returned.
/// 
/// Hidden sheets are not excluded from the sheet count.
///
/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::sheet()], [crate::of::sheets_()], 
#[inline]
pub fn sheets() -> FnNumber0 {
    FnNumber0("SHEETS", )
}

/// Returns the number of sheets in a reference or current document.
///
/// [documentfoundation->SHEETS](https://wiki.documentfoundation.org/Documentation/Calc_Functions/SHEETS)
///
/// __Syntax__: 
/// ```ods
///     SHEETS( R: Reference )
/// ```
///
/// __Constraints__:
/// R shall not contain a Source Location (5.8 References)
///
/// __Semantics__:
/// Returns the number of sheets in the given reference.
/// 
/// If no parameter is given, the number of sheets in the document is returned.
/// 
/// Hidden sheets are not excluded from the sheet count.
///
/// __See also__: [crate::of::columns()], [crate::of::rows()], [crate::of::sheet()], [crate::of::sheets()], 
#[inline]
pub fn sheets_<A: Reference>(r: A) -> FnNumber1<A> {
    FnNumber1("SHEETS", r)
}

/// Returns a number indicating the type of the provided value.
///
/// [documentfoundation->TYPE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/TYPE)
///
/// __Syntax__: 
/// ```ods
///     TYPE( Value: Any )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// Returns a number indicating the type of the value given:
/// 
/// If a Reference is provided, the reference is first dereferenced, and any 
/// formulas are evaluated. This function does not propagate Error values.
///
/// __Note__:
/// Reliance on the return of 4 for TYPE will impair the interoperability of a 
/// document containing an expression that relies on that value.
///
/// __See also__: [crate::of::error_type()], 
#[inline]
pub fn type_<A: Any>(value: A) -> FnNumber1<A> {
    FnNumber1("TYPE", value)
}

/// Convert text to number.
///
/// [documentfoundation->VALUE](https://wiki.documentfoundation.org/Documentation/Calc_Functions/VALUE)
///
/// __Syntax__: 
/// ```ods
///     VALUE( X: Text )
/// ```
///
/// __Constraints__:
/// None
///
/// __Semantics__:
/// Converts given text value X into Number. If X is a Reference, it is first 
/// dereferenced. It is implementation-defined what happens if VALUE is given 
/// neither a Text value nor a Reference to a Text value. If the Text has a 
/// date, time, or datetime format, it is converted into a serial Number. In 
/// many cases the conversion of a date or datetime format is locale-dependent.
/// 
/// If the supplied text X cannot be converted into a Number, an Error is 
/// returned.
/// 
/// Regardless of the current locale, an evaluator shall accept numbers 
/// matching this regular expression (which does not include a decimal point 
/// character) and convert it into a Number. If the value ends in %, it shall 
/// divide the number by 100:
/// 
/// [+-]? [0-9]+([eE][+-]?[0-9]+)?)%?
/// 
/// VALUE shall accept text representations of numbers in the current locale. 
/// In the en_US locale, an evaluator shall accept decimal numbers matching 
/// this regular expression and convert it into a Number (the leading “$” 
/// is ignored; commas are ignored if they match the rule of a thousands 
/// separator; if the value ends in %, it shall divide the number by 100):
/// 
/// [+-]?\$?([0-9]+(,[0-9]{3})*)?(\.[0-9]+)?(([eE][+-]?[0-9]+)|%)?
/// 
/// Evaluators shall accept fractional values matching the regular expression:
/// 
/// [+-]? [0-9]+ \ [0-9]+/[1-9][0-9]?
/// 
/// A leading minus sign shall be interpreted as identifying a negative number 
/// for the entire value. There is a space between the integer and the 
/// fractional portion; values between 0 and 1 can be represented by using 0 
/// for the integer part.
/// 
/// Evaluators shall support time values in at least the HH:MM and HH:MM:SS 
/// formats, where HH is a 1-2 digit value from 0 to 23, MM is a one- or 
/// two-digit value from 0 to 59, and SS is a one- or two-digit value from 0 to 
/// 59. The hour may be one or two digits when it is less than 10. VALUE 
/// converts time values into Numbers ranging from 0 to 1, which is percentage 
/// of day that has elapsed by that time. Thus, VALUE("2:00") is the same as 
/// 2/24. Evaluators should accept times with fractional seconds as well when 
/// expressed in the form HH:MM:SS.ssss...
/// 
/// Evaluators shall accept textual dates in ISO8601 format (YYYY-MM-DD), 
/// converting them into serial numbers based on the current epoch. Evaluators 
/// shall, when running in the en_US locale, accept the format MM/DD/YYYY .
/// 
/// In addition, in locale en_US, evaluators shall support the following 
/// formats (where YYYY is a 4-digit year, YY a 2-digit year, MM a numerical 
/// month, DD a numerical day, mmm a 3-character abbreviated alphabetical name, 
/// and mmmmm a full name):
/// 
/// Evaluators should support other locales. Many conversions will vary by 
/// locale, including the decimal point (comma or period), names of months, 
/// date formats (MM/DD vs. DD/MM), and so on. Dates in particular vary by 
/// locale.
/// 
/// Evaluators shall support the datetime format, which is a date followed by a 
/// time, using either the space character or the literal “T” character as 
/// the separator (the “T” is from ISO 8601). Evaluators shall support at 
/// least the ISO date format in a datetime format; they may support other date 
/// formats in a datetime format as well. Formats such as “YYYY-MM-DD 
/// HH:MM” and “YYYY-MM-DDTHH:MM:SS” (where “T” is the literal 
/// character T) shall be accepted. The result of accepting a datetime format 
/// shall be a representation of that specific time (without removing either 
/// the date or the time of day, unlike DATEVALUE or TIMEVALUE).
/// 
/// Evaluators may accept other formats that will convert to numbers, and those 
/// conversions may be locale-dependent, as long as they do not conflict with 
/// the above. Where no conversion is determined, an Error is returned.
///
/// __See also__: [crate::of::n()], [crate::of::t()], [crate::of::datevalue()], [crate::of::timevalue()], [crate::of::numbervalue()], 
#[inline]
pub fn value<A: Text>(x: A) -> FnNumber1<A> {
    FnNumber1("VALUE", x)
}