Subsections of Sheetize Namespace
Class EbookConverter
Info
Converter for conversion between ebook and other spreadsheet file formats.
public class EbookConverter
Inheritance
object ←
EbookConverter
Inherited Members
Examples
1EbookConverter converter = new EbookConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "MyStory.xlsx";
4EbookSaveOptions saveOptions = new EbookSaveOptions();
5saveOptions.OutputFile = "res.epub";
6converter.Process(loadOptions, saveOptions);
Constructors
EbookConverter()
Methods
Process(LoadOptions, EbookSaveOptions)
Converts between ebook and other spreadsheet file formats.
public void Process(LoadOptions loadOptions, EbookSaveOptions saveOptions)
Parameters
Class EbookSaveOptions
Info
Options for saving .EPUB, .AZW3.
public class EbookSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
EbookSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
EbookSaveOptions()
public EbookSaveOptions()
Properties
Gets and sets the format of spreadsheet.
public FileFormatType SaveFormat { get; set; }
Property Value
FileFormatType
Class HtmlConverter
Info
Converter for conversion between html files(html, mht, …) and other spreadsheet file formats.
public class HtmlConverter
Inheritance
object ←
HtmlConverter
Inherited Members
Examples
1HtmlConverter converter = new HtmlConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.xlsx";
4HtmlSaveOptions saveOptions = new HtmlSaveOptions();
5saveOptions.OutputFile = "res.html";
6converter.Process(loadOptions, saveOptions);
Constructors
HtmlConverter()
Methods
Process(LoadOptions, HtmlSaveOptions)
Converts file between html and other spreadsheet file formats.
public void Process(LoadOptions loadOptions, HtmlSaveOptions saveOptions)
Parameters
Class HtmlSaveOptions
public class HtmlSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
HtmlSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
HtmlSaveOptions()
Properties
Gets and sets the format of spreadsheet.
public FileFormatType SaveFormat { get; set; }
Property Value
FileFormatType
Class ImageConverter
Info
Converter for converting template file to pdf.
public class ImageConverter
Inheritance
object ←
ImageConverter
Inherited Members
Examples
1private class MyImageSaveOptions : ImageSaveOptions
2{
3 private const string ResultBase = "result/images/";
4 public override Stream GetStream(int pageIndex)
5 {
6 return File.Create(ResultBase + "res_" + pageIndex + ".png");
7 }
8}
9ImageConverter converter = new ImageConverter();
10LoadOptions loadOptions = new LoadOptions();
11loadOptions.InputFile = "Template.xlsx";
12ImageSaveOptions saveOptions = new MyImageSaveOptions();
13converter.Process(loadOptions, saveOptions);
Constructors
ImageConverter()
Methods
Process(LoadOptions, ImageSaveOptions)
Converts template file to images
public void Process(LoadOptions loadOptions, ImageSaveOptions saveOptions)
Parameters
Class ImageSaveOptions
Info
Options for saving image.
public class ImageSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
ImageSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
ImageSaveOptions()
public ImageSaveOptions()
Properties
HorizontalResolution
Gets or sets the horizontal resolution for generated images, in dots per inch.
public int HorizontalResolution { get; set; }
Property Value
int
The default value is 96.
Setting Sheetize.ImageSaveOptions.HorizontalResolution and Sheetize.ImageSaveOptions.VerticalResolution
effects the width and height of the output image in pixels.
ImageType
Gets or sets the format of the generated images.
Default value is Sheetize.ImageType.Png.
public ImageType ImageType { get; set; }
Property Value
ImageType
OnePagePerSheet
If OnePagePerSheet is true, all content of one sheet will output to only one page in result.
The paper size defined by PageSetup will be ignored, but other settings of PageSetup still takes effect.
public bool OnePagePerSheet { get; set; }
Property Value
bool
VerticalResolution
Gets or sets the vertical resolution for generated images, in dots per inch.
public int VerticalResolution { get; set; }
Property Value
int
The default value is 96.
Setting Sheetize.ImageSaveOptions.HorizontalResolution and Sheetize.ImageSaveOptions.VerticalResolution
effects the width and height of the output image in pixels.
Methods
Finish(Stream)
Finish writing data to the stream.
By default this method just closes the stream directly(including the situation that
the stream is the one specified by Sheetize.SaveOptions.OutputStream).
User may overwrite this method to control how to release resources
according to their requirement and the implementation of Sheetize.ImageSaveOptions.GetStream(System.Int32).
public virtual void Finish(Stream stream)
Parameters
stream
Stream: the stream that has finished its task(saving data to)
GetStream(int)
Gets stream to save the image.
public virtual Stream GetStream(int pageIndex)
Parameters
pageIndex
int: the page to render to image
Returns
Stream : Stream for writing generated image to.
By default, if Sheetize.SaveOptions.OutputStream has been specified and takes effect,
then this method returns the specified Stream always. User should overwrite this method in his own implementation
of this class to provide different and proper Stream objects for multi-pages output.
If Sheetize.SaveOptions.OutputFile has been specified and takes effect,
if there is only one page of image, then the specified path(file) will be used directly as the output;
otherwise the page index will be appended to the file name and then return the FileStream build from the file.
For example, if output path is specified as res.png, then the generated images will be res0.png, res1.png, …
Class JsonConverter
Info
Converter for conversion between json data and other spreadsheet file formats.
public class JsonConverter
Inheritance
object ←
JsonConverter
Inherited Members
Examples
1JsonConverter converter = new JsonConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "data.json";
4JsonSaveOptions saveOptions = new JsonSaveOptions();
5saveOptions.OutputFile = "res.xlsx";
6converter.Process(loadOptions, saveOptions);
Constructors
JsonConverter()
Methods
Process(LoadOptions, JsonSaveOptions)
Converts between json data and other spreadsheet file formats.
public void Process(LoadOptions loadOptions, JsonSaveOptions saveOptions)
Parameters
Class JsonSaveOptions
public class JsonSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
JsonSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
JsonSaveOptions()
Properties
Gets and sets the format of spreadsheet.
public FileFormatType SaveFormat { get; set; }
Property Value
FileFormatType
Class License
Inheritance
object ←
License
Inherited Members
Examples
1Sheetize.License license = new Sheetize.License();
2license.SetLicense("mylic.lic");
Constructors
License()
Methods
SetLicense(Stream)
Licenses the product by the Stream which provides license data.
public void SetLicense(Stream stream)
Parameters
SetLicense(string)
Licenses the product by the license file.
public void SetLicense(string licenseName)
Parameters
Class LoadOptions
Info
Options for loading template file.
Inheritance
object ←
LoadOptions
Derived
Inherited Members
Constructors
LoadOptions()
Properties
Gets and sets the file(with path if needed) of the template.
public string InputFile { get; set; }
Property Value
string
When setting a non-null and non-empty path to this property,
the previously set value for Sheetize.LoadOptions.InputStream will be ignored.
Gets and sets the Stream of the template.
public Stream InputStream { get; set; }
Property Value
Stream
When setting a non-null Stream to this property,
the previously set value for Sheetize.LoadOptions.InputFile will be ignored.
Class MergerLoadOptions
Info
Options for merging multiple files.
public class MergerLoadOptions : LoadOptions
Inheritance
object ←
LoadOptions ←
MergerLoadOptions
Inherited Members
- LoadOptions.InputFile,
- LoadOptions.InputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
MergerLoadOptions()
public MergerLoadOptions()
Properties
Gets/sets the input streams from which to load data and merge.
public IEnumerator InputStreamEnumerator { get; set; }
Property Value
IEnumerator
Methods
Finish(Stream)
Finish loading data from the stream(got from Sheetize.MergerLoadOptions.InputStreamEnumerator).
By default this method just closes the stream directly
User may overwrite this method to control how to release resources
according to their requirement and the implementation of Sheetize.MergerLoadOptions.InputStreamEnumerator.
public virtual void Finish(Stream stream)
Parameters
stream
Stream: the stream that has finished its task(saving data to)
Class PdfConverter
Info
Converter for converting template file to pdf.
public class PdfConverter
Inheritance
object ←
PdfConverter
Inherited Members
Examples
1PdfConverter converter = new PdfConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.xlsx";
4PdfSaveOptions saveOptions = new PdfSaveOptions();
5saveOptions.OutputFile = "res.pdf";
6converter.Process(loadOptions, saveOptions);
Constructors
PdfConverter()
Methods
Process(LoadOptions, PdfSaveOptions)
Converts template file to pdf
public void Process(LoadOptions loadOptions, PdfSaveOptions saveOptions)
Parameters
Class PdfSaveOptions
public class PdfSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
PdfSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
PdfSaveOptions()
Class SaveOptions
Inheritance
object ←
SaveOptions
Derived
Inherited Members
Constructors
SaveOptions()
Properties
OutputFile
Gets and sets the file(with path if needed) for saving the generated data.
When setting this property with value other than null or empty string, Sheetize.SaveOptions.OutputStream will be ignored.
public string OutputFile { get; set; }
Property Value
string
OutputStream
Gets and sets the Stream for writing the generated data to.
When setting this property with value other than null, Sheetize.SaveOptions.OutputFile will be ignored.
public Stream OutputStream { get; set; }
Property Value
Stream
Class SheetizeException
Info
The exception that is thrown when Aspose.Cells specified error occurs.
public class SheetizeException : ApplicationException, ISerializable, _Exception
Inheritance
object ←
Exception ←
ApplicationException ←
SheetizeException
Implements
Inherited Members
- Exception.GetBaseException(),
- Exception.ToString(),
- Exception.GetObjectData(SerializationInfo, StreamingContext),
- Exception.GetType(),
- Exception.Message,
- Exception.Data,
- Exception.InnerException,
- Exception.TargetSite,
- Exception.StackTrace,
- Exception.HelpLink,
- Exception.Source,
- Exception.HResult,
- Exception.SerializeObjectState,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Properties
Code
Represents custom exception code.
public ExceptionType Code { get; }
Property Value
ExceptionType
Class SplitterSaveOptions
Info
Options for splitting template file.
public class SplitterSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
SplitterSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
SplitterSaveOptions()
public SplitterSaveOptions()
Properties
Gets and sets the format of spreadsheet.
public FileFormatType SaveFormat { get; set; }
Property Value
FileFormatType
Methods
Finish(Stream)
Finish writing data to the stream.
By default this method just closes the stream directly(including the situation that
the stream is the one specified by Sheetize.SaveOptions.OutputStream).
User may overwrite this method to control how to release resources
according to their requirement and the implementation of Sheetize.SplitterSaveOptions.GetStream(System.Int32).
public virtual void Finish(Stream stream)
Parameters
stream
Stream: the stream that has finished its task(saving data to)
GetStream(int)
Gets stream to save the split part.
public virtual Stream GetStream(int sn)
Parameters
sn
int: the sequence number of the split part, 0 based.
Returns
Stream : Stream for writing split part to.
By default, if Sheetize.SaveOptions.OutputStream has been specified and takes effect,
then this method returns the specified Stream always. User should overwrite this method in his own implementation
of this class to provide different and proper Stream objects for multi-parts output.
If Sheetize.SaveOptions.OutputFile has been specified and takes effect,
then the sequence number will be appended to the file name and then return the FileStream build from the file.
For example, if output path is specified as res.xlsx, then the generated files will be res0.xlsx, res1.xlsx,…
Class SpreadsheetConverter
Info
Converter for conversion between different spreadsheet file formats, such as xls, xlsx, xlsb, ods, spreadsheet ml…
public class SpreadsheetConverter
Inheritance
object ←
SpreadsheetConverter
Inherited Members
Examples
1SpreadsheetConverter converter = new SpreadsheetConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.xlsx";
4SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
5saveOptions.OutputFile = "res.xlsb";
6converter.Process(loadOptions, saveOptions);
Constructors
SpreadsheetConverter()
public SpreadsheetConverter()
Methods
Process(LoadOptions, SpreadsheetSaveOptions)
Converts between different spreadsheet file formats.
public void Process(LoadOptions loadOptions, SpreadsheetSaveOptions saveOptions)
Parameters
Class SpreadsheetMerger
Info
Merges multiple template files into one.
public class SpreadsheetMerger
Inheritance
object ←
SpreadsheetMerger
Inherited Members
Examples
1SpreadsheetMerger merger = new SpreadsheetMerger();
2MergerLoadOptions loadOptions = new MergerLoadOptions();
3ArrayList list = new ArrayList();
4list.Add(File.OpenRead("template1.xlsx"));
5list.Add(File.OpenRead("template2.ods"));
6loadOptions.InputStreamEnumerator = list.GetEnumerator();
7SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
8saveOptions.OutputFile = "res.xlsx";
9merger.Process(loadOptions, saveOptions);
Constructors
SpreadsheetMerger()
public SpreadsheetMerger()
Methods
Process(MergerLoadOptions, SpreadsheetSaveOptions)
public void Process(MergerLoadOptions loadOptions, SpreadsheetSaveOptions saveOptions)
Parameters
Class SpreadsheetSaveOptions
Info
Options for saving spreadsheet.
public class SpreadsheetSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
SpreadsheetSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
SpreadsheetSaveOptions()
public SpreadsheetSaveOptions()
Properties
Gets and sets the format of spreadsheet.
public FileFormatType SaveFormat { get; set; }
Property Value
FileFormatType
Class SpreadsheetSplitter
Info
Splits spreadsheet file into multiple parts.
public class SpreadsheetSplitter
Inheritance
object ←
SpreadsheetSplitter
Inherited Members
Examples
1private class MySplitterSaveOptions : SplitterSaveOptions
2{
3 private const string ResultBase = "result/splitter/";
4 public override Stream GetStream(int sn)
5 {
6 return File.Create(ResultBase + "part_" + sn + ".xlsx");
7 }
8}
9SpreadsheetSplitter splitter = new SpreadsheetSplitter();
10LoadOptions loadOptions = new LoadOptions();
11loadOptions.InputFile = "Template.xlsx";
12MySplitterSaveOptions saveOptions = new MySplitterSaveOptions();
13splitter.Process(loadOptions, saveOptions);
Constructors
SpreadsheetSplitter()
public SpreadsheetSplitter()
Methods
Process(LoadOptions, SplitterSaveOptions)
public void Process(LoadOptions loadOptions, SplitterSaveOptions saveOptions)
Parameters
Class SpreadsheetUnlocker
Info
Unlocks spreadsheet file.
public class SpreadsheetUnlocker
Inheritance
object ←
SpreadsheetUnlocker
Inherited Members
Examples
1SpreadsheetUnlocker processor = new SpreadsheetUnlocker();
2UnlockerLoadOptions loadOptions = new UnlockerLoadOptions();
3loadOptions.InputFile = "Template.xlsx";
4loadOptions.Password = "password to open file";
5SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
6saveOptions.OutputFile = "res.xlsx";
7processor.Process(loadOptions, saveOptions);
Constructors
SpreadsheetUnlocker()
public SpreadsheetUnlocker()
Methods
Process(UnlockerLoadOptions, SpreadsheetSaveOptions)
public void Process(UnlockerLoadOptions loadOptions, SpreadsheetSaveOptions saveOptions)
Parameters
Class TextConverter
Info
Converter for conversion between text based formats(csv, markdown, dif…) and other spreadsheet file formats.
public class TextConverter
Inheritance
object ←
TextConverter
Inherited Members
Examples
1TextConverter converter = new TextConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.csv";
4TextSaveOptions saveOptions = new TextSaveOptions();
5saveOptions.OutputFile = "res.xlsx";
6converter.Process(loadOptions, saveOptions);
Constructors
TextConverter()
Methods
Process(LoadOptions, TextSaveOptions)
Converts file format between text based formats and other spreadsheet file formats
public void Process(LoadOptions loadOptions, TextSaveOptions saveOptions)
Parameters
Class TextSaveOptions
Info
Options for saving .SQL,.MD, .CSV, .TSV, .TXT, .XML, .DIF.
public class TextSaveOptions : SaveOptions
Inheritance
object ←
SaveOptions ←
TextSaveOptions
Inherited Members
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
TextSaveOptions()
Properties
SaveFormat
Gets and sets the format of spreadsheet.
public FileFormatType SaveFormat { get; set; }
Property Value
FileFormatType
Class UnlockerLoadOptions
Info
Options to unlock excel files.
public class UnlockerLoadOptions : LoadOptions
Inheritance
object ←
LoadOptions ←
UnlockerLoadOptions
Inherited Members
- LoadOptions.InputFile,
- LoadOptions.InputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructors
UnlockerLoadOptions()
public UnlockerLoadOptions()
Properties
Password
Password to open the file.
public string Password { get; set; }
Property Value
string
PasswordToModify
Password to modify the file.
public string PasswordToModify { get; set; }
Property Value
string
PasswordToUnprotectWorkbook
Password to unprotect the workbook.
public string PasswordToUnprotectWorkbook { get; set; }
Property Value
string
PasswordToUnprotectWorksheet
Password to unprotect the worksheet.
public string PasswordToUnprotectWorksheet { get; set; }
Property Value
string
Enum ExceptionType
Info
Represents custom exception type code.
public enum ExceptionType
Fields
DataType = 0
: Invalid data type setting.FileCorrupted = 13
: File content is corrupted.FileFormat = 1
: Invalid file format.IO = 8
: The file is invalid.IncorrectPassword = 4
: Incorrect password.Interrupted = 7
: The process is interrupted.InvalidData = 2
: Invalid data.InvalidOperator = 3
: Invalid operator.License = 5
: License related errors.Limitation = 6
: Out of MS Excel limitation error.Permission = 9
: Permission is required to open this file.UndisclosedInformation = 12
: Files contains some undisclosed information.UnsupportedFeature = 10
: Unsupported feature.UnsupportedStream = 11
: Unsupported stream to be opened.
Info
Represents the supported file formats for conversion.
public enum FileFormatType
Fields
Auto = 0
: If saving the file to the disk,the file format accords to the extension of the file name. If saving the file to the stream, the file format is xlsx.Azw3 = 773
: Represents Azw3 file.Bmp = 263
: Windows BitmapCsv = 1
: Comma-Separated Values(CSV) text file.Dif = 30
: Data Interchange Format.Docx = 62
: Represents .docx file.Emf = 258
: Windows Enhanced Metafile.Epub = 772
: Represents Epub file.Excel97To2003 = 5
: Represents an Excel97-2003 xls file.Fods = 59
: Represents OpenDocument Flat XML Spreadsheet (.fods) file format.Gif = 322
: GifHtml = 12
: Represents a html file.Jpg = 261
: JPEG JFIF.Json = 513
: JsonMHtml = 17
: Represents a mhtml file.Markdown = 57
: Represents markdown document.Numbers = 56
: Represents a numbers file. Not supported.Ods = 14
: Open Document Sheet(ODS) file.Ots = 31
: Open Document Template Sheet(OTS) file.Pdf = 13
: Represents a Pdf file.Png = 262
: Portable Network Graphics.Pptx = 61
: Represents .pptx file.SpreadsheetML = 15
: Represents an Excel 2003 xml file.SqlScript = 514
: SqlSvg = 28
: SVG file.Sxc = 60
: Represents StarOffice Calc Spreadsheet (.sxc) file format.TabDelimited = 11
: Represents a tab delimited text file, same with Sheetize.FileFormatType.Tsv.Tiff = 21
: Represents a TIFF file.Tsv = 11
: Tab-Separated Values(TSV) text file.Unknown = 255
: Represents unrecognized format, cannot be saved.XHtml = 771
: Represents XHtml file.Xlam = 10
: Represents an xltm file which enable add-in macros.Xlsb = 16
: Represents an xlsb file.Xlsm = 7
: Represents an xlsm file which enable macros.Xlsx = 6
: Represents an xlsx file.Xlt = 32
: Excel 97-2003 template file.Xltm = 9
: Represents an xltm file which enable macros.Xltx = 8
: Represents an xltx file.Xml = 51
: Represents a simple xml file.Xps = 20
: XPS (XML Paper Specification) format.
Enum ImageType
Info
Specifies the type (format) of an image.
Fields
Bmp = 7
: Windows BitmapEmf = 2
: Windows Enhanced Metafile.Gif = 66
: GifJpeg = 5
: JPEG JFIF.OfficeCompatibleEmf = 71
: Windows Enhanced Metafile which is more compatible with Office.Pict = 4
: Macintosh PICT.Png = 6
: Portable Network Graphics.Svg = 68
: SvgSvm = 69
: SvmTiff = 67
: TiffUnknown = 0
: An unknown image type.WebP = 72
: Weppy image formatWmf = 3
: Windows Metafile.