-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExcelSDK.twin
1892 lines (1830 loc) · 60.5 KB
/
ExcelSDK.twin
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
Module ExcelSDK
Public Type POINT 'Not needed if WinDevLib present
x As Long
y As Long
End Type
#Region "xlcall.h"
'100% coverage
Public Type XLREF
rwFirst As Integer
rwLast As Integer
colFirst As Byte
colLast As Byte
End Type
/*
** XLMREF structure
**
** Describes multiple rectangular references.
** This is a variable size structure, default
** size is 1 reference.
*/
Public Type XLMREF
count As Integer
reftbl(1023) As XLREF /* actually reftbl[count] */
End Type
Public Type XLREF12
rwFirst As Long
rwLast As Long
colFirst As Long
colLast As Long
End Type
Public Type XLMREF12
count As Integer
reftbl(1023) As XLREF12 /* actually reftbl[count] */
End Type
Public Type FP
rows As Integer
columns As Integer
' double array[1]; /* Actually, array[rows][columns] -- array[columns][rows]*/
End Type
Public Type FP12
rows As Long
columns As Long
' double array[1]; /* Actually, array[rows][columns] -- array[columns][rows]*/
End Type
Public Enum XloperTypes
xltypeNum = &H0001
xltypeStr = &H0002
xltypeBool = &H0004
xltypeRef = &H0008
xltypeErr = &H0010
xltypeFlow = &H0020
xltypeMulti = &H0040
xltypeMissing = &H0080
xltypeNil = &H0100
xltypeSRef = &H0400
xltypeInt = &H0800
xlbitXLFree = &H1000
xlbitDLLFree = &H4000
xltypeBigData = (xltypeStr Or xltypeInt)
End Enum
Public Type XLOPER
#If Win64 Then
val(1) As LongLong 'for 8 byte alignment
#Else
val(0) As LongLong 'for 8 byte alignment
#End If
'BAD EXCEL SDK DEVS:
' union
' {
' double num; /* xltypeNum */
' LPSTR str; /* xltypeStr */
' #ifdef __cplusplus
' WORD xbool; /* xltypeBool */
' #else
' WORD bool; /* xltypeBool */
' #endif
' WORD err; /* xltypeErr */
' short int w; /* xltypeInt */
' struct
' {
' WORD count; /* always = 1 */
' XLREF ref;
' } sref; /* xltypeSRef */
' struct
' {
' XLMREF *lpmref;
' IDSHEET idSheet;
' } mref; /* xltypeRef */
' struct
' {
' struct xloper *lparray;
' WORD rows;
' WORD columns;
' } array; /* xltypeMulti */
' struct
' {
' union
' {
' short int level; /* xlflowRestart */
' short int tbctrl; /* xlflowPause */
' IDSHEET idSheet; /* xlflowGoto */
' } valflow;
' WORD rw; /* xlflowGoto */
' BYTE col; /* xlflowGoto */
' BYTE xlflow;
' } flow; /* xltypeFlow */
' struct
' {
' union
' {
' BYTE *lpbData; /* data passed to XL */
' HANDLE hdata; /* data returned from XL */
' } h;
' long cbData;
' } bigdata; /* xltypeBigData */
' } val;
/* [TypeHint(XloperTypes)] */ xltype As Integer
End Type
Public Type XLOPER12
' union
' {
' double num; /* xltypeNum */
' XCHAR *str; /* xltypeStr */
' BOOL xbool; /* xltypeBool */
' int err; /* xltypeErr */
' int w;
' struct
' {
' WORD count; /* always = 1 */
' XLREF12 ref;
' } sref; /* xltypeSRef */
' struct
' {
' XLMREF12 *lpmref;
' IDSHEET idSheet;
' } mref; /* xltypeRef */
' struct
' {
' struct xloper12 *lparray;
' RW rows;
' COL columns;
' } array; /* xltypeMulti */
' struct
' {
' union
' {
' int level; /* xlflowRestart */
' int tbctrl; /* xlflowPause */
' IDSHEET idSheet; /* xlflowGoto */
' } valflow;
' RW rw; /* xlflowGoto */
' COL col; /* xlflowGoto */
' BYTE xlflow;
' } flow; /* xltypeFlow */
' struct
' {
' union
' {
' BYTE *lpbData; /* data passed to XL */
' HANDLE hdata; /* data returned from XL */
' } h;
' long cbData;
' } bigdata; /* xltypeBigData */
' } val;
' DWORD xltype;
val(2) As LongLong 'for 8 byte alignment
xltype As XloperTypes
End Type
Public Enum XloperErrorCodes
xlerrNull = 0
xlerrDiv0 = 7
xlerrValue = 15
xlerrRef = 23
xlerrName = 29
xlerrNum = 36
xlerrNA = 42
xlerrGettingData = 43
End Enum
Public Enum XloperFlowDataTypes
xlflowHalt = 1
xlflowGoto = 2
xlflowRestart = 8
xlflowPause = 16
xlflowResume = 64
End Enum
Public Enum Excel4ReturnCodes
xlretSuccess = 0 /* success */
xlretAbort = 1 /* macro halted */
xlretInvXlfn = 2 /* invalid function number */
xlretInvCount = 4 /* invalid number of arguments */
xlretInvXloper = 8 /* invalid OPER structure */
xlretStackOvfl = 16 /* stack overflow */
xlretFailed = 32 /* command failed */
xlretUncalced = 64 /* uncalced cell */
xlretNotThreadSafe = 128 /* not allowed during multi-threaded calc */
xlretInvAsynchronousContext = 256 /* invalid asynchronous function handle */
xlretNotClusterSafe = 512 /* not supported on cluster */
End Enum
Public Enum ExcelXllEvents
xleventCalculationEnded = 1 /* Fires at the end of calculation */
xleventCalculationCanceled = 2 /* Fires when calculation is interrupted */
End Enum
' int _cdecl Excel4(int xlfn, LPXLOPER operRes, int count,... );
Public Declare PtrSafe Function Excel4 CDecl Lib "XLCall32.dll" (ByVal xlfn As ExcelCommandNumbers, operRes As XLOPER, ByVal count As Long, ByVal ParamArray args As Any()) As Excel4ReturnCodes
' int pascal Excel4v(int xlfn, LPXLOPER operRes, int count, LPXLOPER opers[]);
Public Declare PtrSafe Function Excel4v Lib "XLCall32.dll" (ByVal xlfn As ExcelCommandNumbers, operRes As XLOPER, ByVal count As Long, opers As XLOPER) As Excel4ReturnCodes
Public Declare PtrSafe Function XLCallVer Lib "XLCall32.dll" () As Long
' long pascal LPenHelper(int wCode, VOID *lpv);
Public Declare PtrSafe Function LPenHelper Lib "XLCall32.dll" (ByVal wCode As Long, lpv As Any) As Long
' int _cdecl Excel12(int xlfn, LPXLOPER12 operRes, int count,... );
' /* followed by count LPXLOPER12s */
'(Unsupported)
' int pascal Excel12v(int xlfn, LPXLOPER12 operRes, int count, LPXLOPER12 opers[]);
' Public Delegate Function Excel12v (ByVal xlfn As ExcelCommandNumbers, operRes As XLOPER12, ByVal count As Long, opers As XLOPER12) As Excel4ReturnCodes
' typedef int (CALLBACK *PXL_HPC_ASYNC_CALLBACK)(LPXLOPER12 operAsyncHandle, LPXLOPER12 operReturn);
Public Delegate Function XL_HPC_ASYNC_CALLBACK (operAsyncHandle As XLOPER12, operReturn As XLOPER12) As Long
Public Enum ExcelClusterConReturnCodes
xlHpcRetSuccess = 0
xlHpcRetSessionIdInvalid = -1
xlHpcRetCallFailed = -2
End Enum
Public Enum ExcelCallbackFunctionNumbers
xlCommand = &H8000&
xlSpecial = &H4000
xlIntl = &H2000
xlPrompt = &H1000
xlFree = (0 Or xlSpecial)
xlStack = (1 Or xlSpecial)
xlCoerce = (2 Or xlSpecial)
xlSet = (3 Or xlSpecial)
xlSheetId = (4 Or xlSpecial)
xlSheetNm = (5 Or xlSpecial)
xlAbort = (6 Or xlSpecial)
xlGetInst = (7 Or xlSpecial) /* Returns application's hinstance as an integer value, supported on 32-bit platform only */
xlGetHwnd = (8 Or xlSpecial)
xlGetName = (9 Or xlSpecial)
xlEnableXLMsgs = (10 Or xlSpecial)
xlDisableXLMsgs = (11 Or xlSpecial)
xlDefineBinaryName = (12 Or xlSpecial)
xlGetBinaryName = (13 Or xlSpecial)
/* GetFooInfo are valid only for calls to LPenHelper */
xlGetFmlaInfo = (14 Or xlSpecial)
xlGetMouseInfo = (15 Or xlSpecial)
xlAsyncReturn = (16 Or xlSpecial) /*Set return value from an asynchronous function call*/
xlEventRegister = (17 Or xlSpecial) /*Register an XLL event*/
xlRunningOnCluster = (18 Or xlSpecial) /*Returns true if running on Compute Cluster*/
xlGetInstPtr = (19 Or xlSpecial) /* Returns application's hinstance as a handle, supported on both 32-bit and 64-bit platforms */
End Enum
Public Enum ExcelEditModes
xlModeReady = 0 ' not in edit mode
xlModeEnter = 1 ' enter mode
xlModeEdit = 2 ' edit mode
xlModePoint = 4 ' point mode
End Enum
Public Enum ExcelDocTypes
dtNil = &H7f ' window is not a sheet, macro, chart or basic
' OR window is not the selected window at idle state
dtSheet = 0 ' sheet
dtProc = 1 ' XLM macro
dtChart = 2 ' Chart
dtBasic = 6 ' VBA
End Enum
Public Enum ExcelHitTestCodes
htNone = &H00 ' none of below
htClient = &H01 ' internal for "in the client are", should never see
htVSplit = &H02 ' vertical split area with split panes
htHSplit = &H03 ' horizontal split area
htColWidth = &H04 ' column width adjuster area
htRwHeight = &H05 ' row height adjuster area
htRwColHdr = &H06 ' the intersection of row and column headers
htObject = &H07 ' the body of an object
' the following are for size handles of draw objects
htTopLeft = &H08
htBotLeft = &H09
htLeft = &H0A
htTopRight = &H0B
htBotRight = &H0C
htRight = &H0D
htTop = &H0E
htBot = &H0F
' end size handles
htRwGut = &H10 ' row area of outline gutter
htColGut = &H11 ' column area of outline gutter
htTextBox = &H12 ' body of a text box (where we shouw I-Beam cursor)
htRwLevels = &H13 ' row levels buttons of outline gutter
htColLevels = &H14 ' column levels buttons of outline gutter
htDman = &H15 ' the drag/drop handle of the selection
htDmanFill = &H16 ' the auto-fill handle of the selection
htXSplit = &H17 ' the intersection of the horz & vert pane splits
htVertex = &H18 ' a vertex of a polygon draw object
htAddVtx = &H19 ' htVertex in add a vertex mode
htDelVtx = &H1A ' htVertex in delete a vertex mode
htRwHdr = &H1B ' row header
htColHdr = &H1C ' column header
htRwShow = &H1D ' Like htRowHeight except means grow a hidden column
htColShow = &H1E ' column version of htRwShow
htSizing = &H1F ' Internal use only
htSxpivot = &H20 ' a drag/drop tile in a pivot table
htTabs = &H21 ' the sheet paging tabs
htEdit = &H22 ' Internal use only
End Enum
Public Type FMLAINFO
wPointMode As Long ' current edit mode. 0 => rest of struct undefined
cch As Long ' count of characters in formula
lpch As LongPtr 'char* ' pointer to formula characters. READ ONLY!!!
ichFirst As Long ' char offset to start of selection
ichLast As Long ' char offset to end of selection (may be > cch)
ichCaret As Long ' char offset to blinking caret
End Type
Public Type MOUSEINFO
/* input section */
hwnd As LongPtr ' window to get info on
pt As POINT ' mouse position to get info on
/* output section */
dt As Long ' document(page) type
ht As Long ' hit test code
rw As Long ' row @ mouse (-1 if #n/a)
col As Long ' col @ mouse (-1 if #n/a)
End Type
Public Enum ExcelFunctionNumbers
xlUDF = 255
xlfCount = 0
xlfIsna = 2
xlfIserror = 3
xlfSum = 4
xlfAverage = 5
xlfMin = 6
xlfMax = 7
xlfRow = 8
xlfColumn = 9
xlfNa = 10
xlfNpv = 11
xlfStdev = 12
xlfDollar = 13
xlfFixed = 14
xlfSin = 15
xlfCos = 16
xlfTan = 17
xlfAtan = 18
xlfPi = 19
xlfSqrt = 20
xlfExp = 21
xlfLn = 22
xlfLog10 = 23
xlfAbs = 24
xlfInt = 25
xlfSign = 26
xlfRound = 27
xlfLookup = 28
xlfIndex = 29
xlfRept = 30
xlfMid = 31
xlfLen = 32
xlfValue = 33
xlfTrue = 34
xlfFalse = 35
xlfAnd = 36
xlfOr = 37
xlfNot = 38
xlfMod = 39
xlfDcount = 40
xlfDsum = 41
xlfDaverage = 42
xlfDmin = 43
xlfDmax = 44
xlfDstdev = 45
xlfVar = 46
xlfDvar = 47
xlfText = 48
xlfLinest = 49
xlfTrend = 50
xlfLogest = 51
xlfGrowth = 52
xlfGoto = 53
xlfHalt = 54
xlfPv = 56
xlfFv = 57
xlfNper = 58
xlfPmt = 59
xlfRate = 60
xlfMirr = 61
xlfIrr = 62
xlfRand = 63
xlfMatch = 64
xlfDate = 65
xlfTime = 66
xlfDay = 67
xlfMonth = 68
xlfYear = 69
xlfWeekday = 70
xlfHour = 71
xlfMinute = 72
xlfSecond = 73
xlfNow = 74
xlfAreas = 75
xlfRows = 76
xlfColumns = 77
xlfOffset = 78
xlfAbsref = 79
xlfRelref = 80
xlfArgument = 81
xlfSearch = 82
xlfTranspose = 83
xlfError = 84
xlfStep = 85
xlfType = 86
xlfEcho = 87
xlfSetName = 88
xlfCaller = 89
xlfDeref = 90
xlfWindows = 91
xlfSeries = 92
xlfDocuments = 93
xlfActiveCell = 94
xlfSelection = 95
xlfResult = 96
xlfAtan2 = 97
xlfAsin = 98
xlfAcos = 99
xlfChoose = 100
xlfHlookup = 101
xlfVlookup = 102
xlfLinks = 103
xlfInput = 104
xlfIsref = 105
xlfGetFormula = 106
xlfGetName = 107
xlfSetValue = 108
xlfLog = 109
xlfExec = 110
xlfChar = 111
xlfLower = 112
xlfUpper = 113
xlfProper = 114
xlfLeft = 115
xlfRight = 116
xlfExact = 117
xlfTrim = 118
xlfReplace = 119
xlfSubstitute = 120
xlfCode = 121
xlfNames = 122
xlfDirectory = 123
xlfFind = 124
xlfCell = 125
xlfIserr = 126
xlfIstext = 127
xlfIsnumber = 128
xlfIsblank = 129
xlfT = 130
xlfN = 131
xlfFopen = 132
xlfFclose = 133
xlfFsize = 134
xlfFreadln = 135
xlfFread = 136
xlfFwriteln = 137
xlfFwrite = 138
xlfFpos = 139
xlfDatevalue = 140
xlfTimevalue = 141
xlfSln = 142
xlfSyd = 143
xlfDdb = 144
xlfGetDef = 145
xlfReftext = 146
xlfTextref = 147
xlfIndirect = 148
xlfRegister = 149
xlfCall = 150
xlfAddBar = 151
xlfAddMenu = 152
xlfAddCommand = 153
xlfEnableCommand = 154
xlfCheckCommand = 155
xlfRenameCommand = 156
xlfShowBar = 157
xlfDeleteMenu = 158
xlfDeleteCommand = 159
xlfGetChartItem = 160
xlfDialogBox = 161
xlfClean = 162
xlfMdeterm = 163
xlfMinverse = 164
xlfMmult = 165
xlfFiles = 166
xlfIpmt = 167
xlfPpmt = 168
xlfCounta = 169
xlfCancelKey = 170
xlfInitiate = 175
xlfRequest = 176
xlfPoke = 177
xlfExecute = 178
xlfTerminate = 179
xlfRestart = 180
xlfHelp = 181
xlfGetBar = 182
xlfProduct = 183
xlfFact = 184
xlfGetCell = 185
xlfGetWorkspace = 186
xlfGetWindow = 187
xlfGetDocument = 188
xlfDproduct = 189
xlfIsnontext = 190
xlfGetNote = 191
xlfNote = 192
xlfStdevp = 193
xlfVarp = 194
xlfDstdevp = 195
xlfDvarp = 196
xlfTrunc = 197
xlfIslogical = 198
xlfDcounta = 199
xlfDeleteBar = 200
xlfUnregister = 201
xlfUsdollar = 204
xlfFindb = 205
xlfSearchb = 206
xlfReplaceb = 207
xlfLeftb = 208
xlfRightb = 209
xlfMidb = 210
xlfLenb = 211
xlfRoundup = 212
xlfRounddown = 213
xlfAsc = 214
xlfDbcs = 215
xlfRank = 216
xlfAddress = 219
xlfDays360 = 220
xlfToday = 221
xlfVdb = 222
xlfMedian = 227
xlfSumproduct = 228
xlfSinh = 229
xlfCosh = 230
xlfTanh = 231
xlfAsinh = 232
xlfAcosh = 233
xlfAtanh = 234
xlfDget = 235
xlfCreateObject = 236
xlfVolatile = 237
xlfLastError = 238
xlfCustomUndo = 239
xlfCustomRepeat = 240
xlfFormulaConvert = 241
xlfGetLinkInfo = 242
xlfTextBox = 243
xlfInfo = 244
xlfGroup = 245
xlfGetObject = 246
xlfDb = 247
xlfPause = 248
xlfResume = 251
xlfFrequency = 252
xlfAddToolbar = 253
xlfDeleteToolbar = 254
xlfResetToolbar = 256
xlfEvaluate = 257
xlfGetToolbar = 258
xlfGetTool = 259
xlfSpellingCheck = 260
xlfErrorType = 261
xlfAppTitle = 262
xlfWindowTitle = 263
xlfSaveToolbar = 264
xlfEnableTool = 265
xlfPressTool = 266
xlfRegisterId = 267
xlfGetWorkbook = 268
xlfAvedev = 269
xlfBetadist = 270
xlfGammaln = 271
xlfBetainv = 272
xlfBinomdist = 273
xlfChidist = 274
xlfChiinv = 275
xlfCombin = 276
xlfConfidence = 277
xlfCritbinom = 278
xlfEven = 279
xlfExpondist = 280
xlfFdist = 281
xlfFinv = 282
xlfFisher = 283
xlfFisherinv = 284
xlfFloor = 285
xlfGammadist = 286
xlfGammainv = 287
xlfCeiling = 288
xlfHypgeomdist = 289
xlfLognormdist = 290
xlfLoginv = 291
xlfNegbinomdist = 292
xlfNormdist = 293
xlfNormsdist = 294
xlfNorminv = 295
xlfNormsinv = 296
xlfStandardize = 297
xlfOdd = 298
xlfPermut = 299
xlfPoisson = 300
xlfTdist = 301
xlfWeibull = 302
xlfSumxmy2 = 303
xlfSumx2my2 = 304
xlfSumx2py2 = 305
xlfChitest = 306
xlfCorrel = 307
xlfCovar = 308
xlfForecast = 309
xlfFtest = 310
xlfIntercept = 311
xlfPearson = 312
xlfRsq = 313
xlfSteyx = 314
xlfSlope = 315
xlfTtest = 316
xlfProb = 317
xlfDevsq = 318
xlfGeomean = 319
xlfHarmean = 320
xlfSumsq = 321
xlfKurt = 322
xlfSkew = 323
xlfZtest = 324
xlfLarge = 325
xlfSmall = 326
xlfQuartile = 327
xlfPercentile = 328
xlfPercentrank = 329
xlfMode = 330
xlfTrimmean = 331
xlfTinv = 332
xlfMovieCommand = 334
xlfGetMovie = 335
xlfConcatenate = 336
xlfPower = 337
xlfPivotAddData = 338
xlfGetPivotTable = 339
xlfGetPivotField = 340
xlfGetPivotItem = 341
xlfRadians = 342
xlfDegrees = 343
xlfSubtotal = 344
xlfSumif = 345
xlfCountif = 346
xlfCountblank = 347
xlfScenarioGet = 348
xlfOptionsListsGet = 349
xlfIspmt = 350
xlfDatedif = 351
xlfDatestring = 352
xlfNumberstring = 353
xlfRoman = 354
xlfOpenDialog = 355
xlfSaveDialog = 356
xlfViewGet = 357
xlfGetpivotdata = 358
xlfHyperlink = 359
xlfPhonetic = 360
xlfAveragea = 361
xlfMaxa = 362
xlfMina = 363
xlfStdevpa = 364
xlfVarpa = 365
xlfStdeva = 366
xlfVara = 367
xlfBahttext = 368
xlfThaidayofweek = 369
xlfThaidigit = 370
xlfThaimonthofyear = 371
xlfThainumsound = 372
xlfThainumstring = 373
xlfThaistringlength = 374
xlfIsthaidigit = 375
xlfRoundbahtdown = 376
xlfRoundbahtup = 377
xlfThaiyear = 378
xlfRtd = 379
xlfCubevalue = 380
xlfCubemember = 381
xlfCubememberproperty = 382
xlfCuberankedmember = 383
xlfHex2bin = 384
xlfHex2dec = 385
xlfHex2oct = 386
xlfDec2bin = 387
xlfDec2hex = 388
xlfDec2oct = 389
xlfOct2bin = 390
xlfOct2hex = 391
xlfOct2dec = 392
xlfBin2dec = 393
xlfBin2oct = 394
xlfBin2hex = 395
xlfImsub = 396
xlfImdiv = 397
xlfImpower = 398
xlfImabs = 399
xlfImsqrt = 400
xlfImln = 401
xlfImlog2 = 402
xlfImlog10 = 403
xlfImsin = 404
xlfImcos = 405
xlfImexp = 406
xlfImargument = 407
xlfImconjugate = 408
xlfImaginary = 409
xlfImreal = 410
xlfComplex = 411
xlfImsum = 412
xlfImproduct = 413
xlfSeriessum = 414
xlfFactdouble = 415
xlfSqrtpi = 416
xlfQuotient = 417
xlfDelta = 418
xlfGestep = 419
xlfIseven = 420
xlfIsodd = 421
xlfMround = 422
xlfErf = 423
xlfErfc = 424
xlfBesselj = 425
xlfBesselk = 426
xlfBessely = 427
xlfBesseli = 428
xlfXirr = 429
xlfXnpv = 430
xlfPricemat = 431
xlfYieldmat = 432
xlfIntrate = 433
xlfReceived = 434
xlfDisc = 435
xlfPricedisc = 436
xlfYielddisc = 437
xlfTbilleq = 438
xlfTbillprice = 439
xlfTbillyield = 440
xlfPrice = 441
xlfYield = 442
xlfDollarde = 443
xlfDollarfr = 444
xlfNominal = 445
xlfEffect = 446
xlfCumprinc = 447
xlfCumipmt = 448
xlfEdate = 449
xlfEomonth = 450
xlfYearfrac = 451
xlfCoupdaybs = 452
xlfCoupdays = 453
xlfCoupdaysnc = 454
xlfCoupncd = 455
xlfCoupnum = 456
xlfCouppcd = 457
xlfDuration = 458
xlfMduration = 459
xlfOddlprice = 460
xlfOddlyield = 461
xlfOddfprice = 462
xlfOddfyield = 463
xlfRandbetween = 464
xlfWeeknum = 465
xlfAmordegrc = 466
xlfAmorlinc = 467
xlfConvert = 468
xlfAccrint = 469
xlfAccrintm = 470
xlfWorkday = 471
xlfNetworkdays = 472
xlfGcd = 473
xlfMultinomial = 474
xlfLcm = 475
xlfFvschedule = 476
xlfCubekpimember = 477
xlfCubeset = 478
xlfCubesetcount = 479
xlfIferror = 480
xlfCountifs = 481
xlfSumifs = 482
xlfAverageif = 483
xlfAverageifs = 484
xlfAggregate = 485
xlfBinom_dist = 486
xlfBinom_inv = 487
xlfConfidence_norm = 488
xlfConfidence_t = 489
xlfChisq_test = 490
xlfF_test = 491
xlfCovariance_p = 492
xlfCovariance_s = 493
xlfExpon_dist = 494
xlfGamma_dist = 495
xlfGamma_inv = 496
xlfMode_mult = 497
xlfMode_sngl = 498
xlfNorm_dist = 499
xlfNorm_inv = 500
xlfPercentile_exc = 501
xlfPercentile_inc = 502
xlfPercentrank_exc = 503
xlfPercentrank_inc = 504
xlfPoisson_dist = 505
xlfQuartile_exc = 506
xlfQuartile_inc = 507
xlfRank_avg = 508
xlfRank_eq = 509
xlfStdev_s = 510
xlfStdev_p = 511
xlfT_dist = 512
xlfT_dist_2t = 513
xlfT_dist_rt = 514
xlfT_inv = 515
xlfT_inv_2t = 516
xlfVar_s = 517
xlfVar_p = 518
xlfWeibull_dist = 519
xlfNetworkdays_intl = 520
xlfWorkday_intl = 521
xlfEcma_ceiling = 522
xlfIso_ceiling = 523
xlfBeta_dist = 525
xlfBeta_inv = 526
xlfChisq_dist = 527
xlfChisq_dist_rt = 528
xlfChisq_inv = 529
xlfChisq_inv_rt = 530
xlfF_dist = 531
xlfF_dist_rt = 532
xlfF_inv = 533
xlfF_inv_rt = 534
xlfHypgeom_dist = 535
xlfLognorm_dist = 536
xlfLognorm_inv = 537
xlfNegbinom_dist = 538
xlfNorm_s_dist = 539
xlfNorm_s_inv = 540
xlfT_test = 541
xlfZ_test = 542
xlfErf_precise = 543
xlfErfc_precise = 544
xlfGammaln_precise = 545
xlfCeiling_precise = 546
xlfFloor_precise = 547
xlfAcot = 548
xlfAcoth = 549
xlfCot = 550
xlfCoth = 551
xlfCsc = 552
xlfCsch = 553
xlfSec = 554
xlfSech = 555
xlfImtan = 556
xlfImcot = 557
xlfImcsc = 558
xlfImcsch = 559
xlfImsec = 560
xlfImsech = 561
xlfBitand = 562
xlfBitor = 563
xlfBitxor = 564
xlfBitlshift = 565
xlfBitrshift = 566
xlfPermutationa = 567
xlfCombina = 568
xlfXor = 569
xlfPduration = 570
xlfBase = 571
xlfDecimal = 572
xlfDays = 573
xlfBinom_dist_range = 574
xlfGamma = 575
xlfSkew_p = 576
xlfGauss = 577
xlfPhi = 578
xlfRri = 579
xlfUnichar = 580
xlfUnicode = 581
xlfMunit = 582
xlfArabic = 583
xlfIsoweeknum = 584
xlfNumbervalue = 585
xlfSheet = 586
xlfSheets = 587
xlfFormulatext = 588
xlfIsformula = 589
xlfIfna = 590
xlfCeiling_math = 591
xlfFloor_math = 592
xlfImsinh = 593
xlfImcosh = 594
xlfFilterxml = 595
xlfWebservice = 596
xlfEncodeurl = 597
End Enum
Public Enum ExcelCommandNumbers
xlcBeep = (0 Or xlCommand)
xlcOpen = (1 Or xlCommand)
xlcOpenLinks = (2 Or xlCommand)
xlcCloseAll = (3 Or xlCommand)
xlcSave = (4 Or xlCommand)
xlcSaveAs = (5 Or xlCommand)
xlcFileDelete = (6 Or xlCommand)
xlcPageSetup = (7 Or xlCommand)
xlcPrint = (8 Or xlCommand)
xlcPrinterSetup = (9 Or xlCommand)
xlcQuit = (10 Or xlCommand)
xlcNewWindow = (11 Or xlCommand)
xlcArrangeAll = (12 Or xlCommand)
xlcWindowSize = (13 Or xlCommand)
xlcWindowMove = (14 Or xlCommand)
xlcFull = (15 Or xlCommand)
xlcClose = (16 Or xlCommand)
xlcRun = (17 Or xlCommand)
xlcSetPrintArea = (22 Or xlCommand)
xlcSetPrintTitles = (23 Or xlCommand)
xlcSetPageBreak = (24 Or xlCommand)
xlcRemovePageBreak = (25 Or xlCommand)
xlcFont = (26 Or xlCommand)
xlcDisplay = (27 Or xlCommand)
xlcProtectDocument = (28 Or xlCommand)
xlcPrecision = (29 Or xlCommand)
xlcA1R1c1 = (30 Or xlCommand)
xlcCalculateNow = (31 Or xlCommand)
xlcCalculation = (32 Or xlCommand)
xlcDataFind = (34 Or xlCommand)
xlcExtract = (35 Or xlCommand)
xlcDataDelete = (36 Or xlCommand)
xlcSetDatabase = (37 Or xlCommand)
xlcSetCriteria = (38 Or xlCommand)
xlcSort = (39 Or xlCommand)
xlcDataSeries = (40 Or xlCommand)
xlcTable = (41 Or xlCommand)
xlcFormatNumber = (42 Or xlCommand)
xlcAlignment = (43 Or xlCommand)
xlcStyle = (44 Or xlCommand)
xlcBorder = (45 Or xlCommand)
xlcCellProtection = (46 Or xlCommand)
xlcColumnWidth = (47 Or xlCommand)
xlcUndo = (48 Or xlCommand)
xlcCut = (49 Or xlCommand)
xlcCopy = (50 Or xlCommand)
xlcPaste = (51 Or xlCommand)
xlcClear = (52 Or xlCommand)
xlcPasteSpecial = (53 Or xlCommand)
xlcEditDelete = (54 Or xlCommand)
xlcInsert = (55 Or xlCommand)
xlcFillRight = (56 Or xlCommand)
xlcFillDown = (57 Or xlCommand)
xlcDefineName = (61 Or xlCommand)
xlcCreateNames = (62 Or xlCommand)
xlcFormulaGoto = (63 Or xlCommand)
xlcFormulaFind = (64 Or xlCommand)
xlcSelectLastCell = (65 Or xlCommand)
xlcShowActiveCell = (66 Or xlCommand)
xlcGalleryArea = (67 Or xlCommand)
xlcGalleryBar = (68 Or xlCommand)
xlcGalleryColumn = (69 Or xlCommand)
xlcGalleryLine = (70 Or xlCommand)
xlcGalleryPie = (71 Or xlCommand)
xlcGalleryScatter = (72 Or xlCommand)
xlcCombination = (73 Or xlCommand)
xlcPreferred = (74 Or xlCommand)
xlcAddOverlay = (75 Or xlCommand)
xlcGridlines = (76 Or xlCommand)
xlcSetPreferred = (77 Or xlCommand)