Class SqlScriptColumnTypeMap
Contents
[
Hide
]SqlScriptColumnTypeMap class
Represents column type map.
public class SqlScriptColumnTypeMap
Constructors
Name | Description |
---|---|
SqlScriptColumnTypeMap() | The default constructor. |
Methods
Name | Description |
---|---|
virtual GetNumbericType() | Gets numeric type in the database. |
virtual GetStringType() | Gets string type in the database. |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using Aspose.Cells.Saving;
using System;
public class SqlScriptColumnTypeMapDemo
{
public static void SqlScriptColumnTypeMapExample()
{
// Create an instance of SqlScriptColumnTypeMap
SqlScriptColumnTypeMap columnTypeMap = new SqlScriptColumnTypeMap();
// Demonstrate the usage of GetStringType and GetNumbericType methods
string stringType = columnTypeMap.GetStringType();
string numericType = columnTypeMap.GetNumbericType();
// Output the results to the console
Console.WriteLine("String Type in Database: " + stringType);
Console.WriteLine("Numeric Type in Database: " + numericType);
// Create an instance of SqlScriptSaveOptions and set the ColumnTypeMap
SqlScriptSaveOptions saveOptions = new SqlScriptSaveOptions
{
ColumnTypeMap = columnTypeMap
};
// Create a workbook and add some data
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Cells["A1"].PutValue("ID");
worksheet.Cells["B1"].PutValue("Name");
worksheet.Cells["A2"].PutValue(1);
worksheet.Cells["B2"].PutValue("John Doe");
// Save the workbook as SQL script using the save options
workbook.Save("SqlScriptExample.sql", saveOptions);
return;
}
}
}
See Also
- namespace Aspose.Cells.Saving
- assembly Aspose.Cells