Sheetize Namespace

Classes

Class NameDescription
AbstractLoadOptionsProviderImplementation to provide multiple load options for processes that use multiple inputs(such as template files).
AbstractSaveOptionsProviderImplementation to provide multiple save options for processes that require multiple outputs. For example, Sheetize.SpreadsheetSplitter feature requires multiple destinations to save the split files.
EbookConverterConverter for conversion between ebook and other spreadsheet file formats.
EbookSaveOptionsOptions for saving .EPUB, .AZW3.
HtmlConverterConverter for conversion between html files(html, mht, …) and other spreadsheet file formats.
HtmlSaveOptionsOptions for saving html.
ImageConverterConverter for converting template file to pdf.
ImageSaveOptionsOptions for saving image.
JsonConverterConverter for conversion between json data and other spreadsheet file formats.
JsonSaveOptionsOptions for saving json.
LicenseLicenses the product.
LoadOptionsOptions for loading template file.
LockerSaveOptionsOptions to lock excel files.
PdfConverterConverter for converting template file to pdf.
PdfSaveOptionsOptions for saving pdf.
ProtectionSettingsRepresents the required settings for protecting one excel file or one sheet in it.
SaveOptionsOptions for saving file.
SaveOptionsProviderAssemblingImplementation to provide save options which save split parts to files and the path of resultant file are named as(it may contains directories): Sheetize.SaveOptionsProviderAssembling.PathHeader+Sheetize.SaveOptionsProviderAssembling.SheetPrefix+SheetIndex(or SheetName) +Sheetize.SaveOptionsProviderAssembling.SplitPartPrefix+SplitPartIndex+Sheetize.SaveOptionsProviderAssembling.PathTail.
SaveOptionsProviderPlaceHoldersImplementation to provide save options which save split parts to files and the path of resultant file are defined with placeholders.
SheetizeExceptionThe exception that is thrown when Sheetize specified error occurs.
SignatureDataData used to add signature for spreadsheet file.
SignatureSaveOptionsOptions for adding signature and saving the signed spreadsheet file.
SplitPartInfoRepresents the information of one input/output for multiple inputs/outputs, such as current page to be rendered when converting spreadsheet to image.
SplitterSaveOptionsOptions for splitting template file.
SpreadsheetConverterConverter for conversion between different spreadsheet file formats, such as xls, xlsx, xlsb, spreadsheet ml…
SpreadsheetLockerLocks spreadsheet file
SpreadsheetMergerMerges multiple template files into one.
SpreadsheetSaveOptionsOptions for saving spreadsheet.
SpreadsheetSignatureAdds/Removes signature for spreadsheet file.
SpreadsheetSplitterSplits spreadsheet file into multiple parts.
SpreadsheetUnlockerUnlocks spreadsheet file.
TextConverterConverter for conversion between text based formats(csv, markdown, dif…) and other spreadsheet file formats.
TextSaveOptionsOptions for saving .SQL,.MD, .CSV, .TSV, .TXT, .XML, .DIF.
UnlockerLoadOptionsOptions to unlock excel files.

Enums

Enum NameDescription
ExceptionTypeRepresents custom exception type code.
FileFormatTypeRepresents the supported file formats for conversion.
ImageTypeSpecifies the type (format) of an image.
ProtectionTypeRepresents protection type of one excel file or one sheet in it.
SignatureTypeEnum representing the type of signature

Subsections of Sheetize Namespace

Class AbstractLoadOptionsProvider

Info

Implementation to provide multiple load options for processes that use multiple inputs(such as template files).

Implementation to provide multiple load options for processes that use multiple inputs(such as template files).

public abstract class AbstractLoadOptionsProvider

Inheritance

objectAbstractLoadOptionsProvider

Inherited Members

Remarks

For example, Sheetize.SpreadsheetMerger feature requires multiple template files to merge.

Constructors

AbstractLoadOptionsProvider()

protected AbstractLoadOptionsProvider()

Properties

Current

Gets the load options from which to load data of currently processed part.

public abstract LoadOptions Current { get; }

Property Value

LoadOptions

Methods

Finish(LoadOptions)

Releases resources after processing currently part of input.

public virtual void Finish(LoadOptions part)

Parameters

  • part LoadOptions: the load options used for currently split part.

Remarks

By default this method just closes the stream specified by the Sheetize.LoadOptions.InputStream directly(if the load options specified a Stream as source). User may overwrite this method to control how to release resources according to their requirement and the implementation of Sheetize.AbstractLoadOptionsProvider.Current.

MoveNext()

Checks whether there is more input.

public abstract bool MoveNext()

Returns

bool :

Namespace: Sheetize Assembly: Sheetize.dll

Class AbstractSaveOptionsProvider

Info

Implementation to provide multiple save options for processes that require multiple outputs. For example, Sheetize.SpreadsheetSplitter feature requires multiple destinations to save the split files.

Implementation to provide multiple save options for processes that require multiple outputs. For example, Sheetize.SpreadsheetSplitter feature requires multiple destinations to save the split files.

public abstract class AbstractSaveOptionsProvider

Inheritance

objectAbstractSaveOptionsProvider

Derived

Inherited Members

Constructors

AbstractSaveOptionsProvider()

protected AbstractSaveOptionsProvider()

Methods

Finish(SaveOptions)

Releases resources after processing currently split part.

public virtual void Finish(SaveOptions part)

Parameters

  • part SaveOptions: the save options used for currently split part.

Remarks

By default this method just closes the stream specified by the Sheetize.SaveOptions.OutputStream directly(if the save options specified a Stream as destination). User may overwrite this method to control how to release resources according to their requirement and the implementation of Sheetize.AbstractSaveOptionsProvider.GetSaveOptions(Sheetize.SplitPartInfo).

GetSaveOptions(SplitPartInfo)

Gets the save options from which to get the output settings for currently split part.

public abstract SaveOptions GetSaveOptions(SplitPartInfo part)

Parameters

Returns

SaveOptions :

Namespace: Sheetize Assembly: Sheetize.dll

Class EbookConverter

Info

Converter for conversion between ebook and other spreadsheet file formats.

public class EbookConverter

Inheritance

objectEbookConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "MyStory.xlsx";
EbookSaveOptions saveOptions = new EbookSaveOptions();
saveOptions.OutputFile = "res.epub";
EbookConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, SaveOptions)

Converts between ebook and other spreadsheet file formats.

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class EbookSaveOptions

Info

Options for saving .EPUB, .AZW3.

public class EbookSaveOptions : SaveOptions

Inheritance

objectSaveOptionsEbookSaveOptions

Inherited Members

Constructors

EbookSaveOptions()

public EbookSaveOptions()

Properties

SaveFormat

Gets and sets the format of spreadsheet.

public FileFormatType SaveFormat { get; set; }

Property Value

FileFormatType

Namespace: Sheetize Assembly: Sheetize.dll

Class HtmlConverter

Info

Converter for conversion between html files(html, mht, …) and other spreadsheet file formats.

public class HtmlConverter

Inheritance

objectHtmlConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.OutputFile = "res.html";
HtmlConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, SaveOptions)

Converts file between html and other spreadsheet file formats.

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class HtmlSaveOptions

Info

Options for saving html.

public class HtmlSaveOptions : SaveOptions

Inheritance

objectSaveOptionsHtmlSaveOptions

Inherited Members

Constructors

HtmlSaveOptions()

public HtmlSaveOptions()

Properties

SaveFormat

Gets and sets the format of spreadsheet.

public FileFormatType SaveFormat { get; set; }

Property Value

FileFormatType

Namespace: Sheetize Assembly: Sheetize.dll

Class ImageConverter

Info

Converter for converting template file to pdf.

public class ImageConverter

Inheritance

objectImageConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
ImageSaveOptions saveOptions = new ImageSaveOptions();
ImageConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, ImageSaveOptions)

Converts template file to images

public static void Process(LoadOptions loadOptions, ImageSaveOptions saveOptions)

Parameters

Remarks

When converting to image of format that supports multiple pages(such as tiff), the specified Sheetize.SaveOptions.OutputFile or Sheetize.SaveOptions.OutputStream will be used directly for the resultant image.
For other types of image, if the save options has specified Stream as output, then all resultant images will be saved to the same Stream. Otherwise, the output files will be build from the specified output file of the save options by appending sequence number of the sheet and split part. For example, if the specified output file is Image.png, then the generated image files will be Image_0_0.png, Image_0_1.png, …, Image_1_0.png, …

Process(LoadOptions, ImageSaveOptions, AbstractSaveOptionsProvider)

Converts template file to images

public static void Process(LoadOptions loadOptions, ImageSaveOptions saveOptions, AbstractSaveOptionsProvider provider)

Parameters

  • loadOptions LoadOptions: Options for input and loading:
  • saveOptions ImageSaveOptions: Options for saving. Its output(Sheetize.SaveOptions.OutputFile or Sheetize.SaveOptions.OutputStream): takes no effect because all outputs will be specified by the “provider” parameter:
  • provider AbstractSaveOptionsProvider: Provider of save options for saving the generated images

Namespace: Sheetize Assembly: Sheetize.dll

Class ImageSaveOptions

Info

Options for saving image.

public class ImageSaveOptions : SaveOptions

Inheritance

objectSaveOptionsImageSaveOptions

Inherited Members

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

Remarks

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

Remarks

The default value is 96.

Setting Sheetize.ImageSaveOptions.HorizontalResolution and Sheetize.ImageSaveOptions.VerticalResolution effects the width and height of the output image in pixels.

Namespace: Sheetize Assembly: Sheetize.dll

Class JsonConverter

Info

Converter for conversion between json data and other spreadsheet file formats.

public class JsonConverter

Inheritance

objectJsonConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "data.json";
SaveOptions saveOptions = new SaveOptions();
saveOptions.OutputFile = "res.xlsx";
JsonConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, SaveOptions)

Converts between json data and other spreadsheet file formats.

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class License

Info

Licenses the product.

public class License

Inheritance

objectLicense

Inherited Members

Examples

[C#]
Sheetize.License license = new Sheetize.License();
license.SetLicense("mylic.lic");

Constructors

License()

public 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

Namespace: Sheetize Assembly: Sheetize.dll

Class LoadOptions

Info

Options for loading template file.

public class LoadOptions

Inheritance

objectLoadOptions

Derived

Inherited Members

Constructors

LoadOptions()

public LoadOptions()

Properties

InputFile

Gets and sets the file(with path if needed) of the template.

public string InputFile { get; set; }

Property Value

string

Remarks

When setting a non-null and non-empty path to this property, the previously set value for Sheetize.LoadOptions.InputStream will be ignored.

InputStream

Gets and sets the Stream of the template.

public Stream InputStream { get; set; }

Property Value

Stream

Remarks

When setting a non-null Stream to this property, the previously set value for Sheetize.LoadOptions.InputFile will be ignored.

Namespace: Sheetize Assembly: Sheetize.dll

Class LockerSaveOptions

Info

Options to lock excel files.

public class LockerSaveOptions : SaveOptions

Inheritance

objectSaveOptionsLockerSaveOptions

Inherited Members

Constructors

LockerSaveOptions()

public LockerSaveOptions()

Properties

Password

Password to open the file.

public string Password { get; set; }

Property Value

string

PasswordOfWriteProtection

Password to modify the file.

public string PasswordOfWriteProtection { get; set; }

Property Value

string

SettingsOfWorkbookProtection

Protection settings to protect the workbook.

public ProtectionSettings SettingsOfWorkbookProtection { get; set; }

Property Value

ProtectionSettings

SettingsOfWorksheetProtection

The default protection settings used to protect the worksheet.

public ProtectionSettings SettingsOfWorksheetProtection { get; set; }

Property Value

ProtectionSettings

Methods

GetPasswordOfWorksheetProtection(SplitPartInfo)

Gets the protection settings to protect one worksheet.

public virtual ProtectionSettings GetPasswordOfWorksheetProtection(SplitPartInfo info)

Parameters

  • info SplitPartInfo: Infomation about current sheet which needs to be protected.

Returns

ProtectionSettings : the protection settings to protect current sheet. By default this method returns the settings specified by Sheetize.LockerSaveOptions.SettingsOfWorksheetProtection. If it is null, current sheet will not be protected.

Namespace: Sheetize Assembly: Sheetize.dll

Class PdfConverter

Info

Converter for converting template file to pdf.

public class PdfConverter

Inheritance

objectPdfConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.OutputFile = "res.pdf";
PdfConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, PdfSaveOptions)

Converts template file to pdf

public static void Process(LoadOptions loadOptions, PdfSaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class ProtectionSettings

Info

Represents the required settings for protecting one excel file or one sheet in it.

public class ProtectionSettings

Inheritance

objectProtectionSettings

Inherited Members

Constructors

ProtectionSettings()

public ProtectionSettings()

Properties

Password

The password of protection.

public string Password { get; set; }

Property Value

string

ProtectionType

The protection type to lock one excel file or one sheet in it.

public ProtectionType ProtectionType { get; set; }

Property Value

ProtectionType

Namespace: Sheetize Assembly: Sheetize.dll

Class SaveOptions

Info

Options for saving file.

public class SaveOptions

Inheritance

objectSaveOptions

Derived

Inherited Members

Constructors

SaveOptions()

public 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

Namespace: Sheetize Assembly: Sheetize.dll

Class SaveOptionsProviderAssembling

Info

Implementation to provide save options which save split parts to files and the path of resultant file are named as(it may contains directories): Sheetize.SaveOptionsProviderAssembling.PathHeader+Sheetize.SaveOptionsProviderAssembling.SheetPrefix+SheetIndex(or SheetName) +Sheetize.SaveOptionsProviderAssembling.SplitPartPrefix+SplitPartIndex+Sheetize.SaveOptionsProviderAssembling.PathTail.

Implementation to provide save options which save split parts to files and the path of resultant file are named as(it may contains directories): Sheetize.SaveOptionsProviderAssembling.PathHeader+Sheetize.SaveOptionsProviderAssembling.SheetPrefix+SheetIndex(or SheetName) +Sheetize.SaveOptionsProviderAssembling.SplitPartPrefix+SplitPartIndex+Sheetize.SaveOptionsProviderAssembling.PathTail.

public class SaveOptionsProviderAssembling : AbstractSaveOptionsProvider

Inheritance

objectAbstractSaveOptionsProviderSaveOptionsProviderAssembling

Inherited Members

Constructors

SaveOptionsProviderAssembling()

public SaveOptionsProviderAssembling()

Properties

BuildPathWithSheetAlways

Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index(or name) and corresponding prefix will not be added to the file path.

public bool BuildPathWithSheetAlways { get; set; }

Property Value

bool

BuildPathWithSplitPartAlways

Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix will not be added to the file path.

public bool BuildPathWithSplitPartAlways { get; set; }

Property Value

bool

PathHeader

Header part(before added content of sheet and split part) of file path.

public string PathHeader { get; set; }

Property Value

string

PathTail

Tailing part(after sequence numbers) of file path. It should include extension of file name.

public string PathTail { get; set; }

Property Value

string

SaveOptionsTemplate

The template for creating instance of save options in Sheetize.SaveOptionsProviderAssembling.GetSaveOptions(Sheetize.SplitPartInfo).

public SaveOptions SaveOptionsTemplate { get; set; }

Property Value

SaveOptions

Remarks

If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.

SheetIndexOffset

Offset of sheet’s index between what used in file path and its actual value(Sheetize.SplitPartInfo.SheetIndex).

public int SheetIndexOffset { get; set; }

Property Value

int

Remarks

Only takes effect when Sheetize.SaveOptionsProviderAssembling.UseSheetName is false.

SheetPrefix

Prefix for the index of worksheet.

public string SheetPrefix { get; set; }

Property Value

string

Remarks

If there is only one worksheet and Sheetize.SaveOptionsProviderAssembling.BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

SplitPartIndexOffset

Offset of split part’s index between what used in file path and its actual value(Sheetize.SplitPartInfo.PartIndex).

public int SplitPartIndexOffset { get; set; }

Property Value

int

SplitPartPrefix

Prefix for the index of split part.

public string SplitPartPrefix { get; set; }

Property Value

string

Remarks

If there is only one split part and Sheetize.SaveOptionsProviderAssembling.BuildPathWithSplitPartAlways is false, then this prefix and the split part index(0) will not be added to the resultant file path.

UseSheetName

Whether builds the file path with sheet name instead of sheet index. Default value is false.

public bool UseSheetName { get; set; }

Property Value

bool

Remarks

The sheet name will never be rebuilt automatically. So when set it to true, please make sure there is no special sheet name that can cause invalid file path or name.

Methods

GetSaveOptions(SplitPartInfo)

Gets the save options from which to get the output settings for currently split part.

public override SaveOptions GetSaveOptions(SplitPartInfo part)

Parameters

Returns

SaveOptions :

Namespace: Sheetize Assembly: Sheetize.dll

Class SaveOptionsProviderPlaceHolders

Info

Implementation to provide save options which save split parts to files and the path of resultant file are defined with placeholders.

Implementation to provide save options which save split parts to files and the path of resultant file are defined with placeholders.

public class SaveOptionsProviderPlaceHolders : AbstractSaveOptionsProvider

Inheritance

objectAbstractSaveOptionsProviderSaveOptionsProviderPlaceHolders

Inherited Members

Constructors

SaveOptionsProviderPlaceHolders(string)

Instantiates an instance to provide save options according to specified templates.

public SaveOptionsProviderPlaceHolders(string pathTemplate)

Parameters

  • pathTemplate string: The template of the resultant file path.

Remarks

The supported placeholders in file path template:

  • ${SheetIndex}: will be replaced by the sheet index of the split part
  • ${SheetName}: will be replaced by the sheet name of the split part
  • ${SplitPartIndex}: will be replaced by the index of the split part
  • ${SheetIndexPrefix}: will be replaced by Sheetize.SaveOptionsProviderPlaceHolders.SheetIndexPrefix
  • ${SheetNamePrefix}: will be replaced by Sheetize.SaveOptionsProviderPlaceHolders.SheetNamePrefix
  • ${SplitPartPrefix}: will be replaced by Sheetize.SaveOptionsProviderPlaceHolders.SplitPartPrefix

Properties

BuildPathWithSheetAlways

Whether add sheet index or name to file path always. Default value is false, that is, when there is only one sheet, the sheet index and name and corresponding prefix(Sheetize.SaveOptionsProviderPlaceHolders.SheetNamePrefix) will not be added to the file path.

public bool BuildPathWithSheetAlways { get; set; }

Property Value

bool

BuildPathWithSplitPartAlways

Whether add split part index to file path always. Default value is false, that is, when there is only one split part, the split part index and corresponding prefix(Sheetize.SaveOptionsProviderPlaceHolders.SplitPartPrefix) will not be added to the file path.

public bool BuildPathWithSplitPartAlways { get; set; }

Property Value

bool

SaveOptionsTemplate

The template for creating instance of save options in Sheetize.SaveOptionsProviderPlaceHolders.GetSaveOptions(Sheetize.SplitPartInfo).

public SaveOptions SaveOptionsTemplate { get; set; }

Property Value

SaveOptions

Remarks

If the template has been specified, then the created instance will copy all setting from it and update the output file accordingly.

SheetIndexOffset

Offset of sheet’s index between what used in file path and its actual value(Sheetize.SplitPartInfo.SheetIndex).

public int SheetIndexOffset { get; set; }

Property Value

int

SheetIndexPrefix

Prefix for the index of worksheet.

public string SheetIndexPrefix { get; set; }

Property Value

string

Remarks

If there is only one worksheet and Sheetize.SaveOptionsProviderPlaceHolders.BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

SheetNamePrefix

Prefix for the index of worksheet.

public string SheetNamePrefix { get; set; }

Property Value

string

Remarks

If there is only one worksheet and Sheetize.SaveOptionsProviderPlaceHolders.BuildPathWithSheetAlways is false, then this prefix and the sheet index(or name) will not be added to the resultant file path.

SplitPartIndexOffset

Offset of split part’s index between what used in file path and its actual value(Sheetize.SplitPartInfo.PartIndex).

public int SplitPartIndexOffset { get; set; }

Property Value

int

SplitPartPrefix

Prefix for the index of split part.

public string SplitPartPrefix { get; set; }

Property Value

string

Remarks

If there is only one split part and Sheetize.SaveOptionsProviderPlaceHolders.BuildPathWithSplitPartAlways is false, then this prefix and the split part index(0) will not be added to the resultant file path.

Methods

GetSaveOptions(SplitPartInfo)

Gets the save options from which to get the output settings for currently split part.

public override SaveOptions GetSaveOptions(SplitPartInfo part)

Parameters

Returns

SaveOptions :

Namespace: Sheetize Assembly: Sheetize.dll

Class SheetizeException

Info

The exception that is thrown when Sheetize specified error occurs.

public class SheetizeException : ApplicationException, ISerializable

Inheritance

objectExceptionApplicationExceptionSheetizeException

Implements

Inherited Members

Properties

Code

Represents custom exception code.

public ExceptionType Code { get; }

Property Value

ExceptionType

Namespace: Sheetize Assembly: Sheetize.dll

Class SignatureData

Info

Data used to add signature for spreadsheet file.

public class SignatureData

Inheritance

objectSignatureData

Inherited Members

Constructors

SignatureData()

public SignatureData()

Properties

CertificateData

Certificate data.

public byte[] CertificateData { get; set; }

Property Value

byte[]

Comment

Comment for the signature.

public string Comment { get; set; }

Property Value

string

Password

Password of the certificate file.

public string Password { get; set; }

Property Value

string

Namespace: Sheetize Assembly: Sheetize.dll

Class SignatureSaveOptions

Info

Options for adding signature and saving the signed spreadsheet file.

public class SignatureSaveOptions : SaveOptions

Inheritance

objectSaveOptionsSignatureSaveOptions

Inherited Members

Constructors

SignatureSaveOptions()

public SignatureSaveOptions()

Properties

SignatureData

Signature data used for adding signature for spreadsheet file. Null value for this property denotes to remove signature from spreadsheet file.

public SignatureData[] SignatureData { get; set; }

Property Value

SignatureData[]

Namespace: Sheetize Assembly: Sheetize.dll

Class SplitPartInfo

Info

Represents the information of one input/output for multiple inputs/outputs, such as current page to be rendered when converting spreadsheet to image.

Represents the information of one input/output for multiple inputs/outputs, such as current page to be rendered when converting spreadsheet to image.

public class SplitPartInfo

Inheritance

objectSplitPartInfo

Inherited Members

Remarks

For some processes, such as converting workbook to image of format that supports multiple pages(such as tiff), the Sheetize.SplitPartInfo.SheetIndex and Sheetize.SplitPartInfo.PartIndex will be -1, Sheetize.SplitPartInfo.SheetName will be empty.

Properties

PartIndex

Index of current part in sequence(0 based). -1 means there are no multiple parts so the result is single.

public int PartIndex { get; }

Property Value

int

Remarks

If multiple sheets need to be processed and every sheet is processed(split) separately, the part index always starts from 0 for every sheet. For example, when converting workbook to images, it represents the output page index of currently processed sheet. And -1 denotes there is only one page for current sheet.

SheetIndex

Index of the sheet where current part is in. -1 denotes there is only one sheet.

public int SheetIndex { get; }

Property Value

int

SheetName

Name of the sheet where current part is in.

public string SheetName { get; }

Property Value

string

Remarks

May be null for some situations such as when rendering the whole workbook to tiff image.

Namespace: Sheetize Assembly: Sheetize.dll

Class SplitterSaveOptions

Info

Options for splitting template file.

public class SplitterSaveOptions : SaveOptions

Inheritance

objectSaveOptionsSplitterSaveOptions

Inherited Members

Constructors

SplitterSaveOptions()

public SplitterSaveOptions()

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetConverter

Info

Converter for conversion between different spreadsheet file formats, such as xls, xlsx, xlsb, spreadsheet ml…

public class SpreadsheetConverter

Inheritance

objectSpreadsheetConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
saveOptions.OutputFile = "res.xlsb";
SpreadsheetConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, SaveOptions)

Converts between different spreadsheet file formats.

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetLocker

Info

Locks spreadsheet file

public class SpreadsheetLocker

Inheritance

objectSpreadsheetLocker

Inherited Members

Examples

[C#]
private class MyLockerSaveOptions : LockerSaveOptions
{
    public override ProtectionSettings GetPasswordOfWorksheetProtection(SplitPartInfo info)
    {
        if (info.SheetName == "ToProtect")
        {
            ProtectionSettings ps = new ProtectionSettings();
            ps.Password = "123456";
            ps.ProtectionType = ProtectionType.All;
            return ps;
        }
        return null;
    }
}
SpreadsheetLocker processor = new SpreadsheetLocker();
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
MyLockerSaveOptions saveOptions = new MyLockerSaveOptions();
saveOptions.Password = "password to lock file";
saveOptions.OutputFile = "res_locked.xlsx";
SpreadsheetLocker.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, LockerSaveOptions)

.

public static void Process(LoadOptions loadOptions, LockerSaveOptions saveOptions)

Parameters

Remarks

The re-saved file after being locked will always have the same format with the source file.

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetMerger

Info

Merges multiple template files into one.

public class SpreadsheetMerger

Inheritance

objectSpreadsheetMerger

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
list.Add(new LoadOptions() { InputFile = "template1.xlsx" });
list.Add(new LoadOptions() { InputFile = "template2.xlsx" });
SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
saveOptions.OutputFile = "merged.xlsx";
SpreadsheetMerger.Process(loadOptions, saveOptions,
    new string[] { "template2.xlsx", "template2.xlsx", });

Methods

Process(LoadOptions, SaveOptions, string[])

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions, string[] files)

Parameters

  • loadOptions LoadOptions: Options for input and loading. Its input(Sheetize.LoadOptions.InputFile or Sheetize.LoadOptions.InputStream): takes no effect because all inputs will be specified by “files” parameter.
  • saveOptions SaveOptions: Options for output and saving:
  • files string[]: All template files to be merged

Process(LoadOptions, SaveOptions, AbstractLoadOptionsProvider)

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions, AbstractLoadOptionsProvider provider)

Parameters

  • loadOptions LoadOptions: Options for loading. Its input(Sheetize.LoadOptions.InputFile or Sheetize.LoadOptions.InputStream): takes no effect because all inputs will be specified by “provider” parameter.
  • saveOptions SaveOptions: Options for output and saving:
  • provider AbstractLoadOptionsProvider: Provider of load options for getting inputs to be merged

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetSaveOptions

Info

Options for saving spreadsheet.

public class SpreadsheetSaveOptions : SaveOptions

Inheritance

objectSaveOptionsSpreadsheetSaveOptions

Inherited Members

Constructors

SpreadsheetSaveOptions()

public SpreadsheetSaveOptions()

Properties

SaveFormat

Gets and sets the format of spreadsheet.

public FileFormatType SaveFormat { get; set; }

Property Value

FileFormatType

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetSignature

Info

Adds/Removes signature for spreadsheet file.

public class SpreadsheetSignature

Inheritance

objectSpreadsheetSignature

Inherited Members

Methods

Process(LoadOptions, SignatureSaveOptions)

public static void Process(LoadOptions loadOptions, SignatureSaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetSplitter

Info

Splits spreadsheet file into multiple parts.

public class SpreadsheetSplitter

Inheritance

objectSpreadsheetSplitter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.xlsx";
SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
SpreadsheetSplitter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, SplitterSaveOptions)

public static void Process(LoadOptions loadOptions, SplitterSaveOptions saveOptions)

Parameters

Remarks

If the save options has specified Stream as output, then all split parts will be saved to the same Stream. Otherwise, the output files will be build from the specified output file by appending sequence number of the sheet and split part. For example, if the specified output file is Split.xlsx, then the generated files will be Split_0_0.xlsx, Split_0_1.xlsx, …, Split_1_0.xlsx, …

Process(LoadOptions, SplitterSaveOptions, AbstractSaveOptionsProvider)

public static void Process(LoadOptions loadOptions, SplitterSaveOptions saveOptions, AbstractSaveOptionsProvider provider)

Parameters

  • loadOptions LoadOptions: Options for input and loading:
  • saveOptions SplitterSaveOptions: Options for saving. Its output(Sheetize.SaveOptions.OutputFile or Sheetize.SaveOptions.OutputStream): takes no effect because all outputs will be specified by the “provider” parameter:
  • provider AbstractSaveOptionsProvider: Provider of save options for saving split parts

Namespace: Sheetize Assembly: Sheetize.dll

Class SpreadsheetUnlocker

Info

Unlocks spreadsheet file.

public class SpreadsheetUnlocker

Inheritance

objectSpreadsheetUnlocker

Inherited Members

Examples

[C#]
UnlockerLoadOptions loadOptions = new UnlockerLoadOptions();
loadOptions.InputFile = "Template.xlsx";
loadOptions.Password = "password to open file";
SaveOptions saveOptions = new SaveOptions();
saveOptions.OutputFile = "res.xlsx";
SpreadsheetUnlocker.Process(loadOptions, saveOptions);

Methods

Process(UnlockerLoadOptions, SaveOptions)

public static void Process(UnlockerLoadOptions loadOptions, SaveOptions saveOptions)

Parameters

Remarks

The re-saved file after being unlocked will always have the same format with the source file.

Namespace: Sheetize Assembly: Sheetize.dll

Class TextConverter

Info

Converter for conversion between text based formats(csv, markdown, dif…) and other spreadsheet file formats.

public class TextConverter

Inheritance

objectTextConverter

Inherited Members

Examples

[C#]
LoadOptions loadOptions = new LoadOptions();
loadOptions.InputFile = "Template.csv";
TextSaveOptions saveOptions = new TextSaveOptions();
saveOptions.OutputFile = "res.xlsx";
TextConverter.Process(loadOptions, saveOptions);

Methods

Process(LoadOptions, SaveOptions)

Converts file format between text based formats and other spreadsheet file formats

public static void Process(LoadOptions loadOptions, SaveOptions saveOptions)

Parameters

Namespace: Sheetize Assembly: Sheetize.dll

Class TextSaveOptions

Info

Options for saving .SQL,.MD, .CSV, .TSV, .TXT, .XML, .DIF.

public class TextSaveOptions : SaveOptions

Inheritance

objectSaveOptionsTextSaveOptions

Inherited Members

Constructors

TextSaveOptions()

public TextSaveOptions()

Properties

SaveFormat

Gets and sets the format of spreadsheet.

public FileFormatType SaveFormat { get; set; }

Property Value

FileFormatType

Namespace: Sheetize Assembly: Sheetize.dll

Class UnlockerLoadOptions

Info

Options to unlock excel files.

public class UnlockerLoadOptions : LoadOptions

Inheritance

objectLoadOptionsUnlockerLoadOptions

Inherited Members

Constructors

UnlockerLoadOptions()

public UnlockerLoadOptions()

Properties

Password

Password to open the file.

public string Password { get; set; }

Property Value

string

PasswordOfWorkbookProtection

Password to protect the workbook. If it is null, workbook protection will be kept without change.

public string PasswordOfWorkbookProtection { get; set; }

Property Value

string

PasswordOfWriteProtection

Password to modify the file. If it is null, write protection will be kept without change.

public string PasswordOfWriteProtection { get; set; }

Property Value

string

Methods

GetPasswordOfWorksheetProtection(SplitPartInfo)

Gets the password to unprotect one worksheet.

public virtual string GetPasswordOfWorksheetProtection(SplitPartInfo info)

Parameters

  • info SplitPartInfo: Infomation about current sheet which needs to be unprotected.

Returns

string : the password to unprotect current sheet. If it is null, protection of current sheet will be kept without change.

Namespace: Sheetize Assembly: Sheetize.dll

Enum ExceptionType

Info

Represents custom exception type code.

public enum ExceptionType

Fields

  • Chart = 0: Invalid chart setting.
  • ConditionalFormatting = 3: Invalid data validation setting.
  • DataType = 1: Invalid data type setting.
  • DataValidation = 2: Invalid data validation setting.
  • FileCorrupted = 23: File content is corrupted.
  • FileFormat = 4: Invalid file format.
  • Formula = 5: Invalid formula.
  • IO = 18: The file is invalid.
  • IncorrectPassword = 8: Incorrect password.
  • Interrupted = 17: The process is interrupted.
  • InvalidData = 6: Invalid data.
  • InvalidOperator = 7: Invalid operator.
  • License = 9: License related errors.
  • Limitation = 10: Out of MS Excel limitation error.
  • PageSetup = 11: Invalid page setup setting.
  • Permission = 19: Permission is required to open this file.
  • PivotTable = 12: Invalid pivotTable setting.
  • Shape = 13: Invalid drawing object setting.
  • SheetName = 15: Invalid worksheet name.
  • SheetType = 16: Invalid worksheet type.
  • Sparkline = 14: Invalid sparkline object setting.
  • UndisclosedInformation = 22: Files contains some undisclosed information.
  • UnsupportedFeature = 20: Unsupported feature.
  • UnsupportedStream = 21: Unsupported stream to be opened.

Namespace: Sheetize Assembly: Sheetize.dll

Enum FileFormatType

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 Bitmap
  • Csv = 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: Gif
  • Html = 12: Represents a html file.
  • Jpg = 261: JPEG JFIF.
  • Json = 513: Json
  • MHtml = 17: Represents a mhtml file.
  • Markdown = 57: Represents markdown document.
  • Numbers09 = 56: Represents Numbers 9.0 file format by Apple Inc.
  • Numbers35 = 62: Represents Numbers 3.5 file format since 2014 by Apple Inc
  • 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: Sql
  • Svg = 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.

Namespace: Sheetize Assembly: Sheetize.dll

Enum ImageType

Info

Specifies the type (format) of an image.

public enum ImageType

Fields

  • Bmp = 7: Windows Bitmap
  • Emf = 2: Windows Enhanced Metafile.
  • Gif = 66: Gif
  • Jpeg = 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: Svg
  • Svm = 69: Svm
  • Tiff = 67: Tiff
  • Unknown = 0: An unknown image type.
  • WebP = 72: Weppy image format
  • Wmf = 3: Windows Metafile.

Namespace: Sheetize Assembly: Sheetize.dll

Enum ProtectionType

Info

Represents protection type of one excel file or one sheet in it.

public enum ProtectionType

Fields

  • All = 0: Represents to protect all.
  • Contents = 1: Represents to protect contents, used in Worksheet protection.
  • None = 6: Represents no protection. Only for Reading property.
  • Objects = 2: Represents to protect objects, used in Worksheet protection.
  • Scenarios = 3: Represents to protect scenarios, used in Worksheet protection.
  • Structure = 4: Represents to protect structure, used in Workbook protection.
  • Windows = 5: Represents to protect window, used in Workbook protection.

Namespace: Sheetize Assembly: Sheetize.dll

Enum SignatureType

Info

Enum representing the type of signature

public enum SignatureType

Fields

  • WorkbookSignature = 0: Represents a workbook signature
  • WorksheetSignature = 1: Represents a worksheet signature

Namespace: Sheetize Assembly: Sheetize.dll

 English