-
Notifications
You must be signed in to change notification settings - Fork 0
/
aspose_cells_tables_linux.go
2083 lines (1753 loc) · 62.5 KB
/
aspose_cells_tables_linux.go
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
// +build linux
// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
// Powered by Aspose.Cells.
package asposecells
// #cgo CXXFLAGS: -std=c++11
// #cgo CFLAGS: -I.
// #cgo LDFLAGS: -Wl,-rpath,"${SRCDIR}/lib/linux_x86_64" -L"${SRCDIR}/lib/linux_x86_64" -lAspose.Cells.CWrapper
// #include <AsposeCellsCWrapper.h>
import "C"
import (
"fmt"
"errors"
"runtime"
"unsafe"
)
/**************Enum TableDataSourceType *****************/
// Represents the table's data source type.
type TableDataSourceType int32
const(
// Excel Worksheet Table
TableDataSourceType_Worksheet TableDataSourceType = 0
// Read-write SharePoint linked List
TableDataSourceType_SharePoint TableDataSourceType = 1
// XML mapper Table
TableDataSourceType_XML TableDataSourceType = 2
// Query Table
TableDataSourceType_QueryTable TableDataSourceType = 3
)
func Int32ToTableDataSourceType(value int32)(TableDataSourceType ,error){
switch value {
case 0: return TableDataSourceType_Worksheet, nil
case 1: return TableDataSourceType_SharePoint, nil
case 2: return TableDataSourceType_XML, nil
case 3: return TableDataSourceType_QueryTable, nil
default:
return 0 ,fmt.Errorf("invalid TableDataSourceType value: %d", value)
}
}
/**************Enum TableStyleElementType *****************/
// Represents the Table or PivotTable style element type.
type TableStyleElementType int32
const(
// Table style element that applies to PivotTable's blank rows.
TableStyleElementType_BlankRow TableStyleElementType = 18
// Table style element that applies to table's first column.
TableStyleElementType_FirstColumn TableStyleElementType = 8
// Table style element that applies to table's first column stripes.
TableStyleElementType_FirstColumnStripe TableStyleElementType = 3
// Table style element that applies to PivotTable's first column subheading.
TableStyleElementType_FirstColumnSubheading TableStyleElementType = 22
// Table style element that applies to table's first header row cell.
TableStyleElementType_FirstHeaderCell TableStyleElementType = 11
// Table style element that applies to table's first row stripes.
TableStyleElementType_FirstRowStripe TableStyleElementType = 5
// Table style element that applies to PivotTable's first row subheading.
TableStyleElementType_FirstRowSubheading TableStyleElementType = 25
// Table style element that applies to PivotTable's first subtotal column.
TableStyleElementType_FirstSubtotalColumn TableStyleElementType = 15
// Table style element that applies to pivot table's first subtotal row.
TableStyleElementType_FirstSubtotalRow TableStyleElementType = 19
// Table style element that applies to pivot table's grand total column.
TableStyleElementType_GrandTotalColumn TableStyleElementType = 28
// Table style element that applies to pivot table's grand total row.
TableStyleElementType_GrandTotalRow TableStyleElementType = 29
// Table style element that applies to table's first total row cell.
TableStyleElementType_FirstTotalCell TableStyleElementType = 13
// Table style element that applies to table's header row.
TableStyleElementType_HeaderRow TableStyleElementType = 9
// Table style element that applies to table's last column.
TableStyleElementType_LastColumn TableStyleElementType = 7
// Table style element that applies to table's last header row cell.
TableStyleElementType_LastHeaderCell TableStyleElementType = 12
// Table style element that applies to table's last total row cell.
TableStyleElementType_LastTotalCell TableStyleElementType = 14
// Table style element that applies to pivot table's page field labels.
TableStyleElementType_PageFieldLabels TableStyleElementType = 1
// Table style element that applies to pivot table's page field values.
TableStyleElementType_PageFieldValues TableStyleElementType = 2
// Table style element that applies to table's second column stripes.
TableStyleElementType_SecondColumnStripe TableStyleElementType = 4
// Table style element that applies to pivot table's second column subheading.
TableStyleElementType_SecondColumnSubheading TableStyleElementType = 23
// Table style element that applies to table's second row stripes.
TableStyleElementType_SecondRowStripe TableStyleElementType = 6
// Table style element that applies to pivot table's second row subheading.
TableStyleElementType_SecondRowSubheading TableStyleElementType = 26
// Table style element that applies to PivotTable's second subtotal column.
TableStyleElementType_SecondSubtotalColumn TableStyleElementType = 16
// Table style element that applies to PivotTable's second subtotal row.
TableStyleElementType_SecondSubtotalRow TableStyleElementType = 20
// Table style element that applies to PivotTable's third column subheading.
TableStyleElementType_ThirdColumnSubheading TableStyleElementType = 24
// Table style element that applies to PivotTable's third row subheading.
TableStyleElementType_ThirdRowSubheading TableStyleElementType = 27
// Table style element that applies to pivot table's third subtotal column.
TableStyleElementType_ThirdSubtotalColumn TableStyleElementType = 17
// Table style element that applies to PivotTable's third subtotal row.
TableStyleElementType_ThirdSubtotalRow TableStyleElementType = 21
// Table style element that applies to table's total row.
TableStyleElementType_TotalRow TableStyleElementType = 10
// Table style element that applies to table's entire content.
TableStyleElementType_WholeTable TableStyleElementType = 0
)
func Int32ToTableStyleElementType(value int32)(TableStyleElementType ,error){
switch value {
case 18: return TableStyleElementType_BlankRow, nil
case 8: return TableStyleElementType_FirstColumn, nil
case 3: return TableStyleElementType_FirstColumnStripe, nil
case 22: return TableStyleElementType_FirstColumnSubheading, nil
case 11: return TableStyleElementType_FirstHeaderCell, nil
case 5: return TableStyleElementType_FirstRowStripe, nil
case 25: return TableStyleElementType_FirstRowSubheading, nil
case 15: return TableStyleElementType_FirstSubtotalColumn, nil
case 19: return TableStyleElementType_FirstSubtotalRow, nil
case 28: return TableStyleElementType_GrandTotalColumn, nil
case 29: return TableStyleElementType_GrandTotalRow, nil
case 13: return TableStyleElementType_FirstTotalCell, nil
case 9: return TableStyleElementType_HeaderRow, nil
case 7: return TableStyleElementType_LastColumn, nil
case 12: return TableStyleElementType_LastHeaderCell, nil
case 14: return TableStyleElementType_LastTotalCell, nil
case 1: return TableStyleElementType_PageFieldLabels, nil
case 2: return TableStyleElementType_PageFieldValues, nil
case 4: return TableStyleElementType_SecondColumnStripe, nil
case 23: return TableStyleElementType_SecondColumnSubheading, nil
case 6: return TableStyleElementType_SecondRowStripe, nil
case 26: return TableStyleElementType_SecondRowSubheading, nil
case 16: return TableStyleElementType_SecondSubtotalColumn, nil
case 20: return TableStyleElementType_SecondSubtotalRow, nil
case 24: return TableStyleElementType_ThirdColumnSubheading, nil
case 27: return TableStyleElementType_ThirdRowSubheading, nil
case 17: return TableStyleElementType_ThirdSubtotalColumn, nil
case 21: return TableStyleElementType_ThirdSubtotalRow, nil
case 10: return TableStyleElementType_TotalRow, nil
case 0: return TableStyleElementType_WholeTable, nil
default:
return 0 ,fmt.Errorf("invalid TableStyleElementType value: %d", value)
}
}
/**************Enum TableStyleType *****************/
// Represents the built-in table style type.
type TableStyleType int32
const(
TableStyleType_None TableStyleType = 0
TableStyleType_TableStyleLight1 TableStyleType = 1
TableStyleType_TableStyleLight2 TableStyleType = 2
TableStyleType_TableStyleLight3 TableStyleType = 3
TableStyleType_TableStyleLight4 TableStyleType = 4
TableStyleType_TableStyleLight5 TableStyleType = 5
TableStyleType_TableStyleLight6 TableStyleType = 6
TableStyleType_TableStyleLight7 TableStyleType = 7
TableStyleType_TableStyleLight8 TableStyleType = 8
TableStyleType_TableStyleLight9 TableStyleType = 9
TableStyleType_TableStyleLight10 TableStyleType = 10
TableStyleType_TableStyleLight11 TableStyleType = 11
TableStyleType_TableStyleLight12 TableStyleType = 12
TableStyleType_TableStyleLight13 TableStyleType = 13
TableStyleType_TableStyleLight14 TableStyleType = 14
TableStyleType_TableStyleLight15 TableStyleType = 15
TableStyleType_TableStyleLight16 TableStyleType = 16
TableStyleType_TableStyleLight17 TableStyleType = 17
TableStyleType_TableStyleLight18 TableStyleType = 18
TableStyleType_TableStyleLight19 TableStyleType = 19
TableStyleType_TableStyleLight20 TableStyleType = 20
TableStyleType_TableStyleLight21 TableStyleType = 21
TableStyleType_TableStyleMedium1 TableStyleType = 22
TableStyleType_TableStyleMedium2 TableStyleType = 23
TableStyleType_TableStyleMedium3 TableStyleType = 24
TableStyleType_TableStyleMedium4 TableStyleType = 25
TableStyleType_TableStyleMedium5 TableStyleType = 26
TableStyleType_TableStyleMedium6 TableStyleType = 27
TableStyleType_TableStyleMedium7 TableStyleType = 28
TableStyleType_TableStyleMedium8 TableStyleType = 29
TableStyleType_TableStyleMedium9 TableStyleType = 30
TableStyleType_TableStyleMedium10 TableStyleType = 31
TableStyleType_TableStyleMedium11 TableStyleType = 32
TableStyleType_TableStyleMedium12 TableStyleType = 33
TableStyleType_TableStyleMedium13 TableStyleType = 34
TableStyleType_TableStyleMedium14 TableStyleType = 35
TableStyleType_TableStyleMedium15 TableStyleType = 36
TableStyleType_TableStyleMedium16 TableStyleType = 37
TableStyleType_TableStyleMedium17 TableStyleType = 38
TableStyleType_TableStyleMedium18 TableStyleType = 39
TableStyleType_TableStyleMedium19 TableStyleType = 40
TableStyleType_TableStyleMedium20 TableStyleType = 41
TableStyleType_TableStyleMedium21 TableStyleType = 42
TableStyleType_TableStyleMedium22 TableStyleType = 43
TableStyleType_TableStyleMedium23 TableStyleType = 44
TableStyleType_TableStyleMedium24 TableStyleType = 45
TableStyleType_TableStyleMedium25 TableStyleType = 46
TableStyleType_TableStyleMedium26 TableStyleType = 47
TableStyleType_TableStyleMedium27 TableStyleType = 48
TableStyleType_TableStyleMedium28 TableStyleType = 49
TableStyleType_TableStyleDark1 TableStyleType = 50
TableStyleType_TableStyleDark2 TableStyleType = 51
TableStyleType_TableStyleDark3 TableStyleType = 52
TableStyleType_TableStyleDark4 TableStyleType = 53
TableStyleType_TableStyleDark5 TableStyleType = 54
TableStyleType_TableStyleDark6 TableStyleType = 55
TableStyleType_TableStyleDark7 TableStyleType = 56
TableStyleType_TableStyleDark8 TableStyleType = 57
TableStyleType_TableStyleDark9 TableStyleType = 58
TableStyleType_TableStyleDark10 TableStyleType = 59
TableStyleType_TableStyleDark11 TableStyleType = 60
TableStyleType_Custom TableStyleType = 61
)
func Int32ToTableStyleType(value int32)(TableStyleType ,error){
switch value {
case 0: return TableStyleType_None, nil
case 1: return TableStyleType_TableStyleLight1, nil
case 2: return TableStyleType_TableStyleLight2, nil
case 3: return TableStyleType_TableStyleLight3, nil
case 4: return TableStyleType_TableStyleLight4, nil
case 5: return TableStyleType_TableStyleLight5, nil
case 6: return TableStyleType_TableStyleLight6, nil
case 7: return TableStyleType_TableStyleLight7, nil
case 8: return TableStyleType_TableStyleLight8, nil
case 9: return TableStyleType_TableStyleLight9, nil
case 10: return TableStyleType_TableStyleLight10, nil
case 11: return TableStyleType_TableStyleLight11, nil
case 12: return TableStyleType_TableStyleLight12, nil
case 13: return TableStyleType_TableStyleLight13, nil
case 14: return TableStyleType_TableStyleLight14, nil
case 15: return TableStyleType_TableStyleLight15, nil
case 16: return TableStyleType_TableStyleLight16, nil
case 17: return TableStyleType_TableStyleLight17, nil
case 18: return TableStyleType_TableStyleLight18, nil
case 19: return TableStyleType_TableStyleLight19, nil
case 20: return TableStyleType_TableStyleLight20, nil
case 21: return TableStyleType_TableStyleLight21, nil
case 22: return TableStyleType_TableStyleMedium1, nil
case 23: return TableStyleType_TableStyleMedium2, nil
case 24: return TableStyleType_TableStyleMedium3, nil
case 25: return TableStyleType_TableStyleMedium4, nil
case 26: return TableStyleType_TableStyleMedium5, nil
case 27: return TableStyleType_TableStyleMedium6, nil
case 28: return TableStyleType_TableStyleMedium7, nil
case 29: return TableStyleType_TableStyleMedium8, nil
case 30: return TableStyleType_TableStyleMedium9, nil
case 31: return TableStyleType_TableStyleMedium10, nil
case 32: return TableStyleType_TableStyleMedium11, nil
case 33: return TableStyleType_TableStyleMedium12, nil
case 34: return TableStyleType_TableStyleMedium13, nil
case 35: return TableStyleType_TableStyleMedium14, nil
case 36: return TableStyleType_TableStyleMedium15, nil
case 37: return TableStyleType_TableStyleMedium16, nil
case 38: return TableStyleType_TableStyleMedium17, nil
case 39: return TableStyleType_TableStyleMedium18, nil
case 40: return TableStyleType_TableStyleMedium19, nil
case 41: return TableStyleType_TableStyleMedium20, nil
case 42: return TableStyleType_TableStyleMedium21, nil
case 43: return TableStyleType_TableStyleMedium22, nil
case 44: return TableStyleType_TableStyleMedium23, nil
case 45: return TableStyleType_TableStyleMedium24, nil
case 46: return TableStyleType_TableStyleMedium25, nil
case 47: return TableStyleType_TableStyleMedium26, nil
case 48: return TableStyleType_TableStyleMedium27, nil
case 49: return TableStyleType_TableStyleMedium28, nil
case 50: return TableStyleType_TableStyleDark1, nil
case 51: return TableStyleType_TableStyleDark2, nil
case 52: return TableStyleType_TableStyleDark3, nil
case 53: return TableStyleType_TableStyleDark4, nil
case 54: return TableStyleType_TableStyleDark5, nil
case 55: return TableStyleType_TableStyleDark6, nil
case 56: return TableStyleType_TableStyleDark7, nil
case 57: return TableStyleType_TableStyleDark8, nil
case 58: return TableStyleType_TableStyleDark9, nil
case 59: return TableStyleType_TableStyleDark10, nil
case 60: return TableStyleType_TableStyleDark11, nil
case 61: return TableStyleType_Custom, nil
default:
return 0 ,fmt.Errorf("invalid TableStyleType value: %d", value)
}
}
/**************Enum TotalsCalculation *****************/
// Determines the type of calculation in the Totals row of the list column.
type TotalsCalculation int32
const(
// Represents Sum totals calculation.
TotalsCalculation_Sum TotalsCalculation = 6
// Represents Count totals calculation.
TotalsCalculation_Count TotalsCalculation = 2
// Represents Average totals calculation.
TotalsCalculation_Average TotalsCalculation = 1
// Represents Max totals calculation.
TotalsCalculation_Max TotalsCalculation = 4
// Represents Min totals calculation.
TotalsCalculation_Min TotalsCalculation = 5
// Represents Var totals calculation.
TotalsCalculation_Var TotalsCalculation = 8
// Represents Count Nums totals calculation.
TotalsCalculation_CountNums TotalsCalculation = 3
// Represents StdDev totals calculation.
TotalsCalculation_StdDev TotalsCalculation = 7
// Represents No totals calculation.
TotalsCalculation_None TotalsCalculation = 0
// Represents custom calculation.
TotalsCalculation_Custom TotalsCalculation = 9
)
func Int32ToTotalsCalculation(value int32)(TotalsCalculation ,error){
switch value {
case 6: return TotalsCalculation_Sum, nil
case 2: return TotalsCalculation_Count, nil
case 1: return TotalsCalculation_Average, nil
case 4: return TotalsCalculation_Max, nil
case 5: return TotalsCalculation_Min, nil
case 8: return TotalsCalculation_Var, nil
case 3: return TotalsCalculation_CountNums, nil
case 7: return TotalsCalculation_StdDev, nil
case 0: return TotalsCalculation_None, nil
case 9: return TotalsCalculation_Custom, nil
default:
return 0 ,fmt.Errorf("invalid TotalsCalculation value: %d", value)
}
}
// Class ListColumn
// Represents a column in a Table.
type ListColumn struct {
ptr unsafe.Pointer
}
// Checks whether the implementation object is nullptr.
// Returns:
// bool
func (instance *ListColumn) IsNull() (bool, error) {
CGoReturnPtr := C.ListColumn_IsNull( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Gets and sets the name of the column.
// Returns:
// string
func (instance *ListColumn) GetName() (string, error) {
CGoReturnPtr := C.ListColumn_GetName( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Gets and sets the name of the column.
// Parameters:
// value - string
// Returns:
// void
func (instance *ListColumn) SetName(value string) error {
CGoReturnPtr := C.ListColumn_SetName( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the type of calculation in the Totals row of the list column.
// Returns:
// int32
func (instance *ListColumn) GetTotalsCalculation() (TotalsCalculation, error) {
CGoReturnPtr := C.ListColumn_GetTotalsCalculation( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToTotalsCalculation(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Gets and sets the type of calculation in the Totals row of the list column.
// Parameters:
// value - int32
// Returns:
// void
func (instance *ListColumn) SetTotalsCalculation(value TotalsCalculation) error {
CGoReturnPtr := C.ListColumn_SetTotalsCalculation( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets the range of this list column.
// Returns:
// Range
func (instance *ListColumn) GetRange() (*Range, error) {
CGoReturnPtr := C.ListColumn_GetRange( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &Range{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteRange)
return result, nil
}
// Gets the formula of totals row of this list column.
// Parameters:
// isR1C1 - bool
// isLocal - bool
// Returns:
// string
func (instance *ListColumn) GetCustomTotalsRowFormula(isr1c1 bool, islocal bool) (string, error) {
CGoReturnPtr := C.ListColumn_GetCustomTotalsRowFormula( instance.ptr, C.bool(isr1c1), C.bool(islocal))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Gets the formula of totals row of this list column.
// Parameters:
// formula - string
// isR1C1 - bool
// isLocal - bool
// Returns:
// void
func (instance *ListColumn) SetCustomTotalsRowFormula(formula string, isr1c1 bool, islocal bool) error {
CGoReturnPtr := C.ListColumn_SetCustomTotalsRowFormula( instance.ptr, C.CString(formula), C.bool(isr1c1), C.bool(islocal))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the formula of the list column.
// Returns:
// string
func (instance *ListColumn) GetFormula() (string, error) {
CGoReturnPtr := C.ListColumn_GetFormula( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Gets and sets the formula of the list column.
// Parameters:
// value - string
// Returns:
// void
func (instance *ListColumn) SetFormula(value string) error {
CGoReturnPtr := C.ListColumn_SetFormula( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets the formula of this list column.
// Parameters:
// isR1C1 - bool
// isLocal - bool
// Returns:
// string
func (instance *ListColumn) GetCustomCalculatedFormula(isr1c1 bool, islocal bool) (string, error) {
CGoReturnPtr := C.ListColumn_GetCustomCalculatedFormula( instance.ptr, C.bool(isr1c1), C.bool(islocal))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Sets the formula for this list column.
// Parameters:
// formula - string
// isR1C1 - bool
// isLocal - bool
// Returns:
// void
func (instance *ListColumn) SetCustomCalculatedFormula(formula string, isr1c1 bool, islocal bool) error {
CGoReturnPtr := C.ListColumn_SetCustomCalculatedFormula( instance.ptr, C.CString(formula), C.bool(isr1c1), C.bool(islocal))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the display labels of total row.
// Returns:
// string
func (instance *ListColumn) GetTotalsRowLabel() (string, error) {
CGoReturnPtr := C.ListColumn_GetTotalsRowLabel( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Gets and sets the display labels of total row.
// Parameters:
// value - string
// Returns:
// void
func (instance *ListColumn) SetTotalsRowLabel(value string) error {
CGoReturnPtr := C.ListColumn_SetTotalsRowLabel( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets the style of the data in this column of the table.
// Returns:
// Style
func (instance *ListColumn) GetDataStyle() (*Style, error) {
CGoReturnPtr := C.ListColumn_GetDataStyle( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &Style{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteStyle)
return result, nil
}
// Sets the style of the data in this column of the table.
// Parameters:
// style - Style
// Returns:
// void
func (instance *ListColumn) SetDataStyle(style *Style) error {
CGoReturnPtr := C.ListColumn_SetDataStyle( instance.ptr, style.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
func DeleteListColumn(listcolumn *ListColumn){
runtime.SetFinalizer(listcolumn, nil)
C.Delete_ListColumn(listcolumn.ptr)
listcolumn.ptr = nil
}
// Class ListColumnCollection
// Represents A collection of all the <see cref="ListColumn"/> objects in the specified ListObject object.
type ListColumnCollection struct {
ptr unsafe.Pointer
}
// Checks whether the implementation object is nullptr.
// Returns:
// bool
func (instance *ListColumnCollection) IsNull() (bool, error) {
CGoReturnPtr := C.ListColumnCollection_IsNull( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Gets the ListColumn by the index.
// Parameters:
// index - int32
// Returns:
// ListColumn
func (instance *ListColumnCollection) Get_Int(index int32) (*ListColumn, error) {
CGoReturnPtr := C.ListColumnCollection_Get_Integer( instance.ptr, C.int(index))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &ListColumn{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteListColumn)
return result, nil
}
// Gets the ListColumn by the name.
// Parameters:
// name - string
// Returns:
// ListColumn
func (instance *ListColumnCollection) Get_String(name string) (*ListColumn, error) {
CGoReturnPtr := C.ListColumnCollection_Get_String( instance.ptr, C.CString(name))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &ListColumn{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteListColumn)
return result, nil
}
// Returns:
// int32
func (instance *ListColumnCollection) GetCount() (int32, error) {
CGoReturnPtr := C.ListColumnCollection_GetCount( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result := int32(CGoReturnPtr.return_value)
return result, nil
}
func DeleteListColumnCollection(listcolumncollection *ListColumnCollection){
runtime.SetFinalizer(listcolumncollection, nil)
C.Delete_ListColumnCollection(listcolumncollection.ptr)
listcolumncollection.ptr = nil
}
// Class ListObject
// Represents a list object on a worksheet.
// The ListObject object is a member of the ListObjects collection.
// The ListObjects collection contains all the list objects on a worksheet.
type ListObject struct {
ptr unsafe.Pointer
}
// Checks whether the implementation object is nullptr.
// Returns:
// bool
func (instance *ListObject) IsNull() (bool, error) {
CGoReturnPtr := C.ListObject_IsNull( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Gets the start row of the range.
// Returns:
// int32
func (instance *ListObject) GetStartRow() (int32, error) {
CGoReturnPtr := C.ListObject_GetStartRow( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result := int32(CGoReturnPtr.return_value)
return result, nil
}
// Gets the start column of the range.
// Returns:
// int32
func (instance *ListObject) GetStartColumn() (int32, error) {
CGoReturnPtr := C.ListObject_GetStartColumn( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result := int32(CGoReturnPtr.return_value)
return result, nil
}
// Gets the end row of the range.
// Returns:
// int32
func (instance *ListObject) GetEndRow() (int32, error) {
CGoReturnPtr := C.ListObject_GetEndRow( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result := int32(CGoReturnPtr.return_value)
return result, nil
}
// Gets the end column of the range.
// Returns:
// int32
func (instance *ListObject) GetEndColumn() (int32, error) {
CGoReturnPtr := C.ListObject_GetEndColumn( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result := int32(CGoReturnPtr.return_value)
return result, nil
}
// Gets ListColumns of the ListObject.
// Returns:
// ListColumnCollection
func (instance *ListObject) GetListColumns() (*ListColumnCollection, error) {
CGoReturnPtr := C.ListObject_GetListColumns( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &ListColumnCollection{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteListColumnCollection)
return result, nil
}
// Resize the range of the list object.
// Parameters:
// startRow - int32
// startColumn - int32
// endRow - int32
// endColumn - int32
// hasHeaders - bool
// Returns:
// void
func (instance *ListObject) Resize(startrow int32, startcolumn int32, endrow int32, endcolumn int32, hasheaders bool) error {
CGoReturnPtr := C.ListObject_Resize( instance.ptr, C.int(startrow), C.int(startcolumn), C.int(endrow), C.int(endcolumn), C.bool(hasheaders))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Put the value to the cell.
// Parameters:
// rowOffset - int32
// columnOffset - int32
// value - Object
// Returns:
// void
func (instance *ListObject) PutCellValue_Int_Int_Object(rowoffset int32, columnoffset int32, value *Object) error {
CGoReturnPtr := C.ListObject_PutCellValue_Integer_Integer_Object( instance.ptr, C.int(rowoffset), C.int(columnoffset), value.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Put the value to the cell.
// Parameters:
// rowOffset - int32
// columnOffset - int32
// value - Object
// isTotalsRowLabel - bool
// Returns:
// void
func (instance *ListObject) PutCellValue_Int_Int_Object_Bool(rowoffset int32, columnoffset int32, value *Object, istotalsrowlabel bool) error {
CGoReturnPtr := C.ListObject_PutCellValue_Integer_Integer_Object_Boolean( instance.ptr, C.int(rowoffset), C.int(columnoffset), value.ptr, C.bool(istotalsrowlabel))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Put the formula to the cell in the table.
// Parameters:
// rowOffset - int32
// columnOffset - int32
// formula - string
// Returns:
// void
func (instance *ListObject) PutCellFormula_Int_Int_String(rowoffset int32, columnoffset int32, formula string) error {
CGoReturnPtr := C.ListObject_PutCellFormula_Integer_Integer_String( instance.ptr, C.int(rowoffset), C.int(columnoffset), C.CString(formula))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Put the formula to the cell in the table.
// Parameters:
// rowOffset - int32
// columnOffset - int32
// formula - string
// isTotalsRowFormula - bool
// Returns:
// void
func (instance *ListObject) PutCellFormula_Int_Int_String_Bool(rowoffset int32, columnoffset int32, formula string, istotalsrowformula bool) error {
CGoReturnPtr := C.ListObject_PutCellFormula_Integer_Integer_String_Boolean( instance.ptr, C.int(rowoffset), C.int(columnoffset), C.CString(formula), C.bool(istotalsrowformula))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets whether this ListObject show header row.
// Returns:
// bool
func (instance *ListObject) GetShowHeaderRow() (bool, error) {
CGoReturnPtr := C.ListObject_GetShowHeaderRow( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)