Class XlsSaveOptions
Contents
[
Hide
]XlsSaveOptions class
Represents the save options for the Excel 97-2003 file format: xls and xlt.
public class XlsSaveOptions : SaveOptions
Constructors
Name | Description |
---|---|
XlsSaveOptions() | Creates options for saving Excel 97-2003 xls file. |
XlsSaveOptions(SaveFormat) | Creates options for saving Excel 97-2003 xls/xlt file. |
Properties
Name | Description |
---|---|
CachedFileFolder { get; set; } | The cached file folder is used to store some large data.(Inherited from SaveOptions .) |
ClearData { get; set; } | Make the workbook empty after saving the file.(Inherited from SaveOptions .) |
CreateDirectory { get; set; } | If true and the directory does not exist, the directory will be automatically created before saving the file.(Inherited from SaveOptions .) |
EncryptDocumentProperties { get; set; } | Indicates whether encrypt document properties when saving as .xls file. The default value is true.(Inherited from SaveOptions .) |
IsTemplate { get; set; } | (Obsolete.) Indicates whether saving a template file. |
LightCellsDataProvider { get; set; } | The data provider for saving workbook in light mode. |
MatchColor { get; set; } | Indicates whether matching font color because there are 56 colors in the standard color palette. |
MergeAreas { get; set; } | Indicates whether merge the areas of conditional formatting and validation before saving the file.(Inherited from SaveOptions .) |
RefreshChartCache { get; set; } | Indicates whether refreshing chart cache data(Inherited from SaveOptions .) |
SaveFormat { get; } | Gets the save file format.(Inherited from SaveOptions .) |
SortExternalNames { get; set; } | Indicates whether sorting external defined names before saving file.(Inherited from SaveOptions .) |
SortNames { get; set; } | Indicates whether sorting defined names before saving file.(Inherited from SaveOptions .) |
UpdateSmartArt { get; set; } | Indicates whether updating smart art setting. The default value is false.(Inherited from SaveOptions .) |
ValidateMergedAreas { get; set; } | Indicates whether validate merged cells before saving the file.(Inherited from SaveOptions .) |
WarningCallback { get; set; } | Gets or sets warning callback.(Inherited from SaveOptions .) |
WpsCompatibility { get; set; } | Indicates whether to make the xls more compatible with WPS. |
Examples
[C#]
namespace Demos
{
using Aspose.Cells;
using System;
public class XlsSaveOptionsDemo
{
public static void XlsSaveOptionsExample()
{
// Create a new workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Fill some data into the worksheet
worksheet.Cells["A1"].PutValue("Name");
worksheet.Cells["B1"].PutValue("Age");
worksheet.Cells["A2"].PutValue("John");
worksheet.Cells["B2"].PutValue(30);
worksheet.Cells["A3"].PutValue("Jane");
worksheet.Cells["B3"].PutValue(25);
// Create an instance of XlsSaveOptions
XlsSaveOptions saveOptions = new XlsSaveOptions();
// Setting properties
saveOptions.MatchColor = true;
saveOptions.ClearData = false;
saveOptions.ValidateMergedAreas = true;
saveOptions.MergeAreas = true;
saveOptions.SortNames = true;
saveOptions.SortExternalNames = false;
saveOptions.RefreshChartCache = true;
saveOptions.UpdateSmartArt = false;
// Save the workbook with the specified save options
workbook.Save("XlsSaveOptionsExample.xlsx", saveOptions);
return;
}
}
}
See Also
- class SaveOptions
- namespace Aspose.Cells
- assembly Aspose.Cells