SqlScriptSaveOptions

SqlScriptSaveOptions class

Represents the options of saving sql.

Constructors

NameDescription
SqlScriptSaveOptionsCreates options for saving sql file.

Properties

NameTypeDescription
CheckIfTableExistsbooleanCheck if the table name exists before creating
ColumnTypeMapSqlScriptColumnTypeMapGets and sets the map of column type for different database.
CheckAllDataForColumnTypebooleanCheck all data to find columns’ data type. The default value is false, we only check the first row for performance. If t
AddBlankLineBetweenRowsbooleanInsert blank line between each data. If Separator is ‘\n’ , it’s better to set this property as true to increase readabi
SeparatorcharGets and sets character separator of sql script. Only can be ’ ’ or ‘\n’. If the
OperatorTypeintGets and sets the operator type of sql. The value of the property is SqlScriptOperatorType integer constant.
PrimaryKeyintRepresents which column is primary key of the data table.
CreateTablebooleanIndicates whether exporting sql of creating table.
IdNameStringGets and sets the name of id column. If this property is set , a column will be inserted with automatical increment int
StartIdintGets and sets the start id. Only works when IdName is set.
TableNameStringGets and sets the table name.
ExportAsStringbooleanIndicates whether exporting all data as string value.
SheetIndexesint[]Represents the indexes of exported sheets.
ExportAreaCellAreaGets or sets the exporting range.
HasHeaderRowbooleanIndicates whether the range contains header row.
SaveFormatintGets the save file format. The value of the property is SaveFormat integer constant.
ClearDatabooleanMake the workbook empty after saving the file.
CachedFileFolderStringThe cached file folder is used to store some large data.
ValidateMergedAreasbooleanIndicates whether validate merged cells before saving the file. The default value is false.
MergeAreasbooleanIndicates whether merge the areas of conditional formatting and validation before saving the file. The default value is
CreateDirectorybooleanIf true and the directory does not exist, the directory will be automatically created before saving the file. The defaul
SortNamesbooleanIndicates whether sorting defined names before saving file.
SortExternalNamesbooleanIndicates whether sorting external defined names before saving file.
RefreshChartCachebooleanIndicates whether refreshing chart cache data
WarningCallbackIWarningCallbackGets or sets warning callback.
CheckExcelRestrictionboolean
UpdateSmartArtbooleanIndicates whether updating smart art setting. The default value is false. Only effects after calling Shape.GetResultOfSm
EncryptDocumentPropertiesboolean

SqlScriptSaveOptions()

Creates options for saving sql file.

SqlScriptSaveOptions.CheckIfTableExists property

Check if the table name exists before creating

Type: boolean

SqlScriptSaveOptions.ColumnTypeMap property

Gets and sets the map of column type for different database.

Type: SqlScriptColumnTypeMap

SqlScriptSaveOptions.CheckAllDataForColumnType property

Check all data to find columns’ data type. The default value is false, we only check the first row for performance. If this property is true and the columns contains mixed value type, the columns’ type will be text.

Type: boolean

SqlScriptSaveOptions.AddBlankLineBetweenRows property

Insert blank line between each data. If Separator is ‘\n’ , it’s better to set this property as true to increase readability.

Type: boolean

SqlScriptSaveOptions.Separator property

Gets and sets character separator of sql script. Only can be ’ ’ or ‘\n’. If the

Type: char

SqlScriptSaveOptions.OperatorType property

Gets and sets the operator type of sql. The value of the property is SqlScriptOperatorType integer constant.

Type: int

SqlScriptSaveOptions.PrimaryKey property

Represents which column is primary key of the data table.

Type: int

SqlScriptSaveOptions.CreateTable property

Indicates whether exporting sql of creating table.

Type: boolean

SqlScriptSaveOptions.IdName property

Gets and sets the name of id column. If this property is set , a column will be inserted with automatical increment int value.

Type: String

SqlScriptSaveOptions.StartId property

Gets and sets the start id. Only works when IdName is set.

Type: int

SqlScriptSaveOptions.TableName property

Gets and sets the table name.

Type: String

SqlScriptSaveOptions.ExportAsString property

Indicates whether exporting all data as string value.

Type: boolean

SqlScriptSaveOptions.SheetIndexes property

Represents the indexes of exported sheets.

Type: int[]

SqlScriptSaveOptions.ExportArea property

Gets or sets the exporting range.

Type: CellArea

SqlScriptSaveOptions.HasHeaderRow property

Indicates whether the range contains header row.

Type: boolean

SqlScriptSaveOptions.SaveFormat property

Gets the save file format. The value of the property is SaveFormat integer constant.

Type: int

SqlScriptSaveOptions.ClearData property

Make the workbook empty after saving the file.

Type: boolean

SqlScriptSaveOptions.CachedFileFolder property

The cached file folder is used to store some large data.

Type: String

SqlScriptSaveOptions.ValidateMergedAreas property

Indicates whether validate merged cells before saving the file. The default value is false.

Type: boolean

SqlScriptSaveOptions.MergeAreas property

Indicates whether merge the areas of conditional formatting and validation before saving the file. The default value is false.

Type: boolean

SqlScriptSaveOptions.CreateDirectory property

If true and the directory does not exist, the directory will be automatically created before saving the file. The default value is false.

Type: boolean

SqlScriptSaveOptions.SortNames property

Indicates whether sorting defined names before saving file.

Type: boolean

SqlScriptSaveOptions.SortExternalNames property

Indicates whether sorting external defined names before saving file.

Type: boolean

SqlScriptSaveOptions.RefreshChartCache property

Indicates whether refreshing chart cache data

Type: boolean

SqlScriptSaveOptions.WarningCallback property

Gets or sets warning callback.

Type: IWarningCallback

SqlScriptSaveOptions.CheckExcelRestriction property

Type: boolean

SqlScriptSaveOptions.UpdateSmartArt property

Indicates whether updating smart art setting. The default value is false. Only effects after calling Shape.GetResultOfSmartArt() method and the cached shapes exist in the template file.

Type: boolean

SqlScriptSaveOptions.EncryptDocumentProperties property

Type: boolean