Skip to content

Commit a29fe32

Browse files
committed
20220726 update : add 4 kinds of save option and update apis.
1 parent 702cd8e commit a29fe32

File tree

7 files changed

+176
-7
lines changed

7 files changed

+176
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ _testmain.go
2222
*.exe
2323
*.test
2424
*.prof
25+
TestData/roywang.pfx

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
- Fetch the required shape from worksheet.
2121
- Leverage the power of named ranges.
2222

23-
## Feature & Enhancements in Version 22.6
23+
## Feature & Enhancements in Version 22.7
2424

25-
- Improve save as api.
26-
- Improve clear objects api.
25+
- Add 4 kinds of Save Option.
26+
- Add the checkExcelRestriction parameter for multiple APIs.
2727

2828
## Read & Write Spreadsheet Formats
2929

model_docx_save_options.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2022 Aspose.Cells Cloud
3+
* Permission is hereby granted, free of charge, to any person obtaining a copy
4+
* of this software and associated documentation files (the "Software"), to deal
5+
* in the Software without restriction, including without limitation the rights
6+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
* copies of the Software, and to permit persons to whom the Software is
8+
* furnished to do so, subject to the following conditions:
9+
*
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
* SOFTWARE.
20+
*
21+
*/
22+
23+
package asposecellscloud
24+
25+
type DocxSaveOptions struct {
26+
EnableHTTPCompression bool `json:"EnableHTTPCompression,omitempty" xml:"EnableHTTPCompression"`
27+
SaveFormat string `json:"SaveFormat,omitempty" xml:"SaveFormat"`
28+
// Make the workbook empty after saving the file.
29+
ClearData bool `json:"ClearData,omitempty" xml:"ClearData"`
30+
// The cached file folder is used to store some large data.
31+
CachedFileFolder string `json:"CachedFileFolder,omitempty" xml:"CachedFileFolder"`
32+
// Indicates whether validate merged areas before saving the file. The default value is false.
33+
ValidateMergedAreas bool `json:"ValidateMergedAreas,omitempty" xml:"ValidateMergedAreas"`
34+
RefreshChartCache bool `json:"RefreshChartCache,omitempty" xml:"RefreshChartCache"`
35+
// If true and the directory does not exist, the directory will be automatically created before saving the file.
36+
CreateDirectory bool `json:"CreateDirectory,omitempty" xml:"CreateDirectory"`
37+
SortNames bool `json:"SortNames,omitempty" xml:"SortNames"`
38+
}

model_import_picture_option.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ type ImportPictureOption struct {
2828
DestinationWorksheet string `json:"DestinationWorksheet,omitempty" xml:"DestinationWorksheet"`
2929
IsInsert bool `json:"IsInsert,omitempty" xml:"IsInsert"`
3030
// Upper Left Row.
31-
UpperLeftRow int32 `json:"UpperLeftRow,omitempty" xml:"UpperLeftRow"`
31+
UpperLeftRow int64 `json:"UpperLeftRow,omitempty" xml:"UpperLeftRow"`
3232
// Upper Left Column.
33-
UpperLeftColumn int32 `json:"UpperLeftColumn,omitempty" xml:"UpperLeftColumn"`
33+
UpperLeftColumn int64 `json:"UpperLeftColumn,omitempty" xml:"UpperLeftColumn"`
3434
// Lower Right Row.
35-
LowerRightRow int32 `json:"LowerRightRow,omitempty" xml:"LowerRightRow"`
35+
LowerRightRow int64 `json:"LowerRightRow,omitempty" xml:"LowerRightRow"`
3636
// Lower Right Column.
37-
LowerRightColumn int32 `json:"LowerRightColumn,omitempty" xml:"LowerRightColumn"`
37+
LowerRightColumn int64 `json:"LowerRightColumn,omitempty" xml:"LowerRightColumn"`
3838
// Filename.
3939
Filename string `json:"Filename,omitempty" xml:"Filename"`
4040
// data : base64 string.

model_json_save_options.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2022 Aspose.Cells Cloud
3+
* Permission is hereby granted, free of charge, to any person obtaining a copy
4+
* of this software and associated documentation files (the "Software"), to deal
5+
* in the Software without restriction, including without limitation the rights
6+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
* copies of the Software, and to permit persons to whom the Software is
8+
* furnished to do so, subject to the following conditions:
9+
*
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
* SOFTWARE.
20+
*
21+
*/
22+
23+
package asposecellscloud
24+
25+
type JsonSaveOptions struct {
26+
EnableHTTPCompression bool `json:"EnableHTTPCompression,omitempty" xml:"EnableHTTPCompression"`
27+
SaveFormat string `json:"SaveFormat,omitempty" xml:"SaveFormat"`
28+
// Make the workbook empty after saving the file.
29+
ClearData bool `json:"ClearData,omitempty" xml:"ClearData"`
30+
// The cached file folder is used to store some large data.
31+
CachedFileFolder string `json:"CachedFileFolder,omitempty" xml:"CachedFileFolder"`
32+
// Indicates whether validate merged areas before saving the file. The default value is false.
33+
ValidateMergedAreas bool `json:"ValidateMergedAreas,omitempty" xml:"ValidateMergedAreas"`
34+
RefreshChartCache bool `json:"RefreshChartCache,omitempty" xml:"RefreshChartCache"`
35+
// If true and the directory does not exist, the directory will be automatically created before saving the file.
36+
CreateDirectory bool `json:"CreateDirectory,omitempty" xml:"CreateDirectory"`
37+
SortNames bool `json:"SortNames,omitempty" xml:"SortNames"`
38+
ExportArea *CellArea `json:"ExportArea,omitempty" xml:"ExportArea"`
39+
HasHeaderRow bool `json:"HasHeaderRow,omitempty" xml:"HasHeaderRow"`
40+
ExportAsString bool `json:"ExportAsString,omitempty" xml:"ExportAsString"`
41+
Indent string `json:"Indent,omitempty" xml:"Indent"`
42+
}

model_pptx_save_options.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2022 Aspose.Cells Cloud
3+
* Permission is hereby granted, free of charge, to any person obtaining a copy
4+
* of this software and associated documentation files (the "Software"), to deal
5+
* in the Software without restriction, including without limitation the rights
6+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
* copies of the Software, and to permit persons to whom the Software is
8+
* furnished to do so, subject to the following conditions:
9+
*
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
* SOFTWARE.
20+
*
21+
*/
22+
23+
package asposecellscloud
24+
25+
type PptxSaveOptions struct {
26+
EnableHTTPCompression bool `json:"EnableHTTPCompression,omitempty" xml:"EnableHTTPCompression"`
27+
SaveFormat string `json:"SaveFormat,omitempty" xml:"SaveFormat"`
28+
// Make the workbook empty after saving the file.
29+
ClearData bool `json:"ClearData,omitempty" xml:"ClearData"`
30+
// The cached file folder is used to store some large data.
31+
CachedFileFolder string `json:"CachedFileFolder,omitempty" xml:"CachedFileFolder"`
32+
// Indicates whether validate merged areas before saving the file. The default value is false.
33+
ValidateMergedAreas bool `json:"ValidateMergedAreas,omitempty" xml:"ValidateMergedAreas"`
34+
RefreshChartCache bool `json:"RefreshChartCache,omitempty" xml:"RefreshChartCache"`
35+
// If true and the directory does not exist, the directory will be automatically created before saving the file.
36+
CreateDirectory bool `json:"CreateDirectory,omitempty" xml:"CreateDirectory"`
37+
SortNames bool `json:"SortNames,omitempty" xml:"SortNames"`
38+
}

model_sql_script_save_options.go

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright (c) 2022 Aspose.Cells Cloud
3+
* Permission is hereby granted, free of charge, to any person obtaining a copy
4+
* of this software and associated documentation files (the "Software"), to deal
5+
* in the Software without restriction, including without limitation the rights
6+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
* copies of the Software, and to permit persons to whom the Software is
8+
* furnished to do so, subject to the following conditions:
9+
*
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
*
13+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
* SOFTWARE.
20+
*
21+
*/
22+
23+
package asposecellscloud
24+
25+
type SqlScriptSaveOptions struct {
26+
EnableHTTPCompression bool `json:"EnableHTTPCompression,omitempty" xml:"EnableHTTPCompression"`
27+
SaveFormat string `json:"SaveFormat,omitempty" xml:"SaveFormat"`
28+
// Make the workbook empty after saving the file.
29+
ClearData bool `json:"ClearData,omitempty" xml:"ClearData"`
30+
// The cached file folder is used to store some large data.
31+
CachedFileFolder string `json:"CachedFileFolder,omitempty" xml:"CachedFileFolder"`
32+
// Indicates whether validate merged areas before saving the file. The default value is false.
33+
ValidateMergedAreas bool `json:"ValidateMergedAreas,omitempty" xml:"ValidateMergedAreas"`
34+
RefreshChartCache bool `json:"RefreshChartCache,omitempty" xml:"RefreshChartCache"`
35+
// If true and the directory does not exist, the directory will be automatically created before saving the file.
36+
CreateDirectory bool `json:"CreateDirectory,omitempty" xml:"CreateDirectory"`
37+
SortNames bool `json:"SortNames,omitempty" xml:"SortNames"`
38+
CheckIfTableExists bool `json:"CheckIfTableExists,omitempty" xml:"CheckIfTableExists"`
39+
ColumnTypeMap string `json:"ColumnTypeMap,omitempty" xml:"ColumnTypeMap"`
40+
CheckAllDataForColumnType bool `json:"CheckAllDataForColumnType,omitempty" xml:"CheckAllDataForColumnType"`
41+
AddBlankLineBetweenRows bool `json:"AddBlankLineBetweenRows,omitempty" xml:"AddBlankLineBetweenRows"`
42+
OperatorType string `json:"OperatorType,omitempty" xml:"OperatorType"`
43+
CreateTable bool `json:"CreateTable,omitempty" xml:"CreateTable"`
44+
IdName string `json:"IdName,omitempty" xml:"IdName"`
45+
StartId int64 `json:"StartId,omitempty" xml:"StartId"`
46+
TableName string `json:"TableName,omitempty" xml:"TableName"`
47+
ExportAsString bool `json:"ExportAsString,omitempty" xml:"ExportAsString"`
48+
ExportArea *CellArea `json:"ExportArea,omitempty" xml:"ExportArea"`
49+
HasHeaderRow bool `json:"HasHeaderRow,omitempty" xml:"HasHeaderRow"`
50+
}

0 commit comments

Comments
 (0)