-
Notifications
You must be signed in to change notification settings - Fork 0
/
aspose_cells_saving.go
2758 lines (2554 loc) · 89.8 KB
/
aspose_cells_saving.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 windows
// 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/win_x86_64" -L"${SRCDIR}/lib/win_x86_64" -lAspose.Cells.CWrapper
// #include <AsposeCellsCWrapper.h>
import "C"
import (
"fmt"
"errors"
"runtime"
"unsafe"
)
/**************Enum SqlScriptOperatorType *****************/
// Represents the type of operating data.
type SqlScriptOperatorType int32
const(
// Insert data.
SqlScriptOperatorType_Insert SqlScriptOperatorType = 0
// Update data.
SqlScriptOperatorType_Update SqlScriptOperatorType = 1
// Delete data.
SqlScriptOperatorType_Delete SqlScriptOperatorType = 2
)
func Int32ToSqlScriptOperatorType(value int32)(SqlScriptOperatorType ,error){
switch value {
case 0: return SqlScriptOperatorType_Insert, nil
case 1: return SqlScriptOperatorType_Update, nil
case 2: return SqlScriptOperatorType_Delete, nil
default:
return 0 ,fmt.Errorf("invalid SqlScriptOperatorType value: %d", value)
}
}
// Class EbookSaveOptions
// Represents the options for saving ebook file.
type EbookSaveOptions struct {
ptr unsafe.Pointer
}
// Creates options for saving ebook file.
func NewEbookSaveOptions() ( *EbookSaveOptions, error) {
ebooksaveoptions := &EbookSaveOptions{}
CGoReturnPtr := C.New_EbookSaveOptions()
if CGoReturnPtr.error_no == 0 {
ebooksaveoptions.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(ebooksaveoptions, DeleteEbookSaveOptions)
return ebooksaveoptions, nil
} else {
ebooksaveoptions.ptr = nil
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return ebooksaveoptions, err
}
}
// Creates options for saving ebook file.
// Parameters:
// saveFormat - int32
func NewEbookSaveOptions_SaveFormat(saveformat SaveFormat) ( *EbookSaveOptions, error) {
ebooksaveoptions := &EbookSaveOptions{}
CGoReturnPtr := C.New_EbookSaveOptions_SaveFormat(C.int( int32(saveformat)))
if CGoReturnPtr.error_no == 0 {
ebooksaveoptions.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(ebooksaveoptions, DeleteEbookSaveOptions)
return ebooksaveoptions, nil
} else {
ebooksaveoptions.ptr = nil
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return ebooksaveoptions, err
}
}
// Constructs from a parent object.
// Parameters:
// src - HtmlSaveOptions
func NewEbookSaveOptions_HtmlSaveOptions(src *HtmlSaveOptions) ( *EbookSaveOptions, error) {
ebooksaveoptions := &EbookSaveOptions{}
CGoReturnPtr := C.New_EbookSaveOptions_HtmlSaveOptions(src.ptr)
if CGoReturnPtr.error_no == 0 {
ebooksaveoptions.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(ebooksaveoptions, DeleteEbookSaveOptions)
return ebooksaveoptions, nil
} else {
ebooksaveoptions.ptr = nil
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return ebooksaveoptions, err
}
}
// Checks whether the implementation object is nullptr.
// Returns:
// bool
func (instance *EbookSaveOptions) IsNull() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_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
}
// Indicate whether exporting those not visible shapes
// Returns:
// bool
func (instance *EbookSaveOptions) GetIgnoreInvisibleShapes() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetIgnoreInvisibleShapes( 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
}
// Indicate whether exporting those not visible shapes
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetIgnoreInvisibleShapes(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetIgnoreInvisibleShapes( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// The title of the html page.
// Only for saving to html stream.
// Returns:
// string
func (instance *EbookSaveOptions) GetPageTitle() (string, error) {
CGoReturnPtr := C.EbookSaveOptions_GetPageTitle( 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
}
// The title of the html page.
// Only for saving to html stream.
// Parameters:
// value - string
// Returns:
// void
func (instance *EbookSaveOptions) SetPageTitle(value string) error {
CGoReturnPtr := C.EbookSaveOptions_SetPageTitle( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// The directory that the attached files will be saved to.
// Only for saving to html stream.
// Returns:
// string
func (instance *EbookSaveOptions) GetAttachedFilesDirectory() (string, error) {
CGoReturnPtr := C.EbookSaveOptions_GetAttachedFilesDirectory( 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
}
// The directory that the attached files will be saved to.
// Only for saving to html stream.
// Parameters:
// value - string
// Returns:
// void
func (instance *EbookSaveOptions) SetAttachedFilesDirectory(value string) error {
CGoReturnPtr := C.EbookSaveOptions_SetAttachedFilesDirectory( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Specify the Url prefix of attached files such as image in the html file.
// Only for saving to html stream.
// Returns:
// string
func (instance *EbookSaveOptions) GetAttachedFilesUrlPrefix() (string, error) {
CGoReturnPtr := C.EbookSaveOptions_GetAttachedFilesUrlPrefix( 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
}
// Specify the Url prefix of attached files such as image in the html file.
// Only for saving to html stream.
// Parameters:
// value - string
// Returns:
// void
func (instance *EbookSaveOptions) SetAttachedFilesUrlPrefix(value string) error {
CGoReturnPtr := C.EbookSaveOptions_SetAttachedFilesUrlPrefix( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Specify the default font name for exporting html, the default font will be used when the font of style is not existing,
// If this property is null, Aspose.Cells will use universal font which have the same family with the original font,
// the default value is null.
// Returns:
// string
func (instance *EbookSaveOptions) GetDefaultFontName() (string, error) {
CGoReturnPtr := C.EbookSaveOptions_GetDefaultFontName( 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
}
// Specify the default font name for exporting html, the default font will be used when the font of style is not existing,
// If this property is null, Aspose.Cells will use universal font which have the same family with the original font,
// the default value is null.
// Parameters:
// value - string
// Returns:
// void
func (instance *EbookSaveOptions) SetDefaultFontName(value string) error {
CGoReturnPtr := C.EbookSaveOptions_SetDefaultFontName( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether to add a generic font to CSS font-family.
// The default value is true
// Returns:
// bool
func (instance *EbookSaveOptions) GetAddGenericFont() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetAddGenericFont( 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
}
// Indicates whether to add a generic font to CSS font-family.
// The default value is true
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetAddGenericFont(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetAddGenericFont( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates if zooming in or out the html via worksheet zoom level when saving file to html, the default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetWorksheetScalable() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetWorksheetScalable( 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
}
// Indicates if zooming in or out the html via worksheet zoom level when saving file to html, the default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetWorksheetScalable(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetWorksheetScalable( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates if exporting comments when saving file to html, the default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) IsExportComments() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_IsExportComments( 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
}
// Indicates if exporting comments when saving file to html, the default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetIsExportComments(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetIsExportComments( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Represents type of exporting comments to html files.
// Returns:
// int32
func (instance *EbookSaveOptions) GetExportCommentsType() (PrintCommentsType, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportCommentsType( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToPrintCommentsType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Represents type of exporting comments to html files.
// Parameters:
// value - int32
// Returns:
// void
func (instance *EbookSaveOptions) SetExportCommentsType(value PrintCommentsType) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportCommentsType( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates if disable Downlevel-revealed conditional comments when exporting file to html, the default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetDisableDownlevelRevealedComments() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetDisableDownlevelRevealedComments( 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
}
// Indicates if disable Downlevel-revealed conditional comments when exporting file to html, the default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetDisableDownlevelRevealedComments(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetDisableDownlevelRevealedComments( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether exporting image files to temp directory.
// Only for saving to html stream.
// Returns:
// bool
func (instance *EbookSaveOptions) IsExpImageToTempDir() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_IsExpImageToTempDir( 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
}
// Indicates whether exporting image files to temp directory.
// Only for saving to html stream.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetIsExpImageToTempDir(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetIsExpImageToTempDir( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether using scalable unit to describe the image width
// when using scalable unit to describe the column width.
// The default value is true.
// Returns:
// bool
func (instance *EbookSaveOptions) GetImageScalable() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetImageScalable( 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
}
// Indicates whether using scalable unit to describe the image width
// when using scalable unit to describe the column width.
// The default value is true.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetImageScalable(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetImageScalable( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether exporting column width in unit of scale to html.
// The default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetWidthScalable() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetWidthScalable( 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
}
// Indicates whether exporting column width in unit of scale to html.
// The default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetWidthScalable(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetWidthScalable( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether exporting the single tab when the file only has one worksheet.
// The default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportSingleTab() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportSingleTab( 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
}
// Indicates whether exporting the single tab when the file only has one worksheet.
// The default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportSingleTab(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportSingleTab( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Specifies whether images are saved in Base64 format to HTML, MHTML or EPUB.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportImagesAsBase64() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportImagesAsBase64( 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
}
// Specifies whether images are saved in Base64 format to HTML, MHTML or EPUB.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportImagesAsBase64(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportImagesAsBase64( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates if only exporting the active worksheet to html file.
// If true then only the active worksheet will be exported to html file;
// If false then the whole workbook will be exported to html file.
// The default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportActiveWorksheetOnly() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportActiveWorksheetOnly( 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
}
// Indicates if only exporting the active worksheet to html file.
// If true then only the active worksheet will be exported to html file;
// If false then the whole workbook will be exported to html file.
// The default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportActiveWorksheetOnly(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportActiveWorksheetOnly( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates if only exporting the print area to html file. The default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportPrintAreaOnly() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportPrintAreaOnly( 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
}
// Indicates if only exporting the print area to html file. The default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportPrintAreaOnly(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportPrintAreaOnly( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets or Sets the exporting CellArea of current active Worksheet.
// If you set this attribute, the print area of current active Worksheet will be omitted.
// Only the specified area will be exported when saving the file to html.
// Returns:
// CellArea
func (instance *EbookSaveOptions) GetExportArea() (*CellArea, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportArea( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &CellArea{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteCellArea)
return result, nil
}
// Gets or Sets the exporting CellArea of current active Worksheet.
// If you set this attribute, the print area of current active Worksheet will be omitted.
// Only the specified area will be exported when saving the file to html.
// Parameters:
// value - CellArea
// Returns:
// void
func (instance *EbookSaveOptions) SetExportArea(value *CellArea) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportArea( instance.ptr, value.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether html tag(such as <c><div></div></c>) in cell should be parsed as cell value or preserved as it is.
// The default value is true.
// Returns:
// bool
func (instance *EbookSaveOptions) GetParseHtmlTagInCell() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetParseHtmlTagInCell( 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
}
// Indicates whether html tag(such as <c><div></div></c>) in cell should be parsed as cell value or preserved as it is.
// The default value is true.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetParseHtmlTagInCell(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetParseHtmlTagInCell( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates if a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format.
// By default the value is Default, so, for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel.
// But the performance for creating large html files,setting the value to Cross would be several times faster than setting it to Default or Fit2Cell.
// Returns:
// int32
func (instance *EbookSaveOptions) GetHtmlCrossStringType() (HtmlCrossType, error) {
CGoReturnPtr := C.EbookSaveOptions_GetHtmlCrossStringType( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToHtmlCrossType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Indicates if a cross-cell string will be displayed in the same way as MS Excel when saving an Excel file in html format.
// By default the value is Default, so, for cross-cell strings, there is little difference between the html files created by Aspose.Cells and MS Excel.
// But the performance for creating large html files,setting the value to Cross would be several times faster than setting it to Default or Fit2Cell.
// Parameters:
// value - int32
// Returns:
// void
func (instance *EbookSaveOptions) SetHtmlCrossStringType(value HtmlCrossType) error {
CGoReturnPtr := C.EbookSaveOptions_SetHtmlCrossStringType( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Hidden column(the width of this column is 0) in excel,before save this into html format,
// if HtmlHiddenColDisplayType is "Remove",the hidden column would not been output,
// if the value is "Hidden", the column would been output,but was hidden,the default value is "Hidden"
// Returns:
// int32
func (instance *EbookSaveOptions) GetHiddenColDisplayType() (HtmlHiddenColDisplayType, error) {
CGoReturnPtr := C.EbookSaveOptions_GetHiddenColDisplayType( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToHtmlHiddenColDisplayType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Hidden column(the width of this column is 0) in excel,before save this into html format,
// if HtmlHiddenColDisplayType is "Remove",the hidden column would not been output,
// if the value is "Hidden", the column would been output,but was hidden,the default value is "Hidden"
// Parameters:
// value - int32
// Returns:
// void
func (instance *EbookSaveOptions) SetHiddenColDisplayType(value HtmlHiddenColDisplayType) error {
CGoReturnPtr := C.EbookSaveOptions_SetHiddenColDisplayType( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Hidden row(the height of this row is 0) in excel,before save this into html format,
// if HtmlHiddenRowDisplayType is "Remove",the hidden row would not been output,
// if the value is "Hidden", the row would been output,but was hidden,the default value is "Hidden"
// Returns:
// int32
func (instance *EbookSaveOptions) GetHiddenRowDisplayType() (HtmlHiddenRowDisplayType, error) {
CGoReturnPtr := C.EbookSaveOptions_GetHiddenRowDisplayType( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToHtmlHiddenRowDisplayType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Hidden row(the height of this row is 0) in excel,before save this into html format,
// if HtmlHiddenRowDisplayType is "Remove",the hidden row would not been output,
// if the value is "Hidden", the row would been output,but was hidden,the default value is "Hidden"
// Parameters:
// value - int32
// Returns:
// void
func (instance *EbookSaveOptions) SetHiddenRowDisplayType(value HtmlHiddenRowDisplayType) error {
CGoReturnPtr := C.EbookSaveOptions_SetHiddenRowDisplayType( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// If not set,use Encoding.UTF8 as default enconding type.
// Returns:
// int32
func (instance *EbookSaveOptions) GetEncoding() (EncodingType, error) {
CGoReturnPtr := C.EbookSaveOptions_GetEncoding( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToEncodingType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// If not set,use Encoding.UTF8 as default enconding type.
// Parameters:
// value - int32
// Returns:
// void
func (instance *EbookSaveOptions) SetEncoding(value EncodingType) error {
CGoReturnPtr := C.EbookSaveOptions_SetEncoding( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Get the ImageOrPrintOptions object before exporting
// Returns:
// ImageOrPrintOptions
func (instance *EbookSaveOptions) GetImageOptions() (*ImageOrPrintOptions, error) {
CGoReturnPtr := C.EbookSaveOptions_GetImageOptions( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &ImageOrPrintOptions{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteImageOrPrintOptions)
return result, nil
}
// Indicates whether save the html as single file.
// The default value is false.
// Returns:
// bool
func (instance *EbookSaveOptions) GetSaveAsSingleFile() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetSaveAsSingleFile( 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
}
// Indicates whether save the html as single file.
// The default value is false.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetSaveAsSingleFile(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetSaveAsSingleFile( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether showing all sheets when saving as a single html file.
// Returns:
// bool
func (instance *EbookSaveOptions) GetShowAllSheets() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetShowAllSheets( 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
}
// Indicates whether showing all sheets when saving as a single html file.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetShowAllSheets(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetShowAllSheets( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether exporting page headers.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportPageHeaders() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportPageHeaders( 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
}
// Indicates whether exporting page headers.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportPageHeaders(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportPageHeaders( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether exporting page headers.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportPageFooters() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportPageFooters( 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
}
// Indicates whether exporting page headers.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportPageFooters(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportPageFooters( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicating if exporting the hidden worksheet content.The default value is true.
// Returns:
// bool
func (instance *EbookSaveOptions) GetExportHiddenWorksheet() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetExportHiddenWorksheet( 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
}
// Indicating if exporting the hidden worksheet content.The default value is true.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetExportHiddenWorksheet(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetExportHiddenWorksheet( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicating if html or mht file is presentation preference.
// The default value is false.
// if you want to get more beautiful presentation,please set the value to true.
// Returns:
// bool
func (instance *EbookSaveOptions) GetPresentationPreference() (bool, error) {
CGoReturnPtr := C.EbookSaveOptions_GetPresentationPreference( 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
}
// Indicating if html or mht file is presentation preference.
// The default value is false.
// if you want to get more beautiful presentation,please set the value to true.
// Parameters:
// value - bool
// Returns:
// void
func (instance *EbookSaveOptions) SetPresentationPreference(value bool) error {
CGoReturnPtr := C.EbookSaveOptions_SetPresentationPreference( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the prefix of the css name,the default value is "".
// Returns:
// string
func (instance *EbookSaveOptions) GetCellCssPrefix() (string, error) {
CGoReturnPtr := C.EbookSaveOptions_GetCellCssPrefix( 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 prefix of the css name,the default value is "".
// Parameters:
// value - string
// Returns:
// void
func (instance *EbookSaveOptions) SetCellCssPrefix(value string) error {
CGoReturnPtr := C.EbookSaveOptions_SetCellCssPrefix( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err