Tiểu mục của Sheetize Namespace
Class EbookConverter
Thông tin
Bộ chuyển đổi cho việc chuyển đổi giữa ebook và các định dạng tệp bảng tính khác.
public class EbookConverter
Kế thừa
object ←
EbookConverter
Các thành viên kế thừa
Ví dụ
1EbookConverter converter = new EbookConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "MyStory.xlsx";
4EbookSaveOptions saveOptions = new EbookSaveOptions();
5saveOptions.OutputFile = "res.epub";
6converter.Process(loadOptions, saveOptions);
Các hàm tạo
EbookConverter()
Các phương thức
Process(LoadOptions, EbookSaveOptions)
Chuyển đổi giữa ebook và các định dạng tệp bảng tính khác.
public void Process(LoadOptions loadOptions, EbookSaveOptions saveOptions)
Tham số
Class EbookSaveOptions
Thông tin
Tùy chọn để lưu .EPUB, .AZW3.
public class EbookSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
EbookSaveOptions
Các thành viên được kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Constructor
EbookSaveOptions()
public EbookSaveOptions()
Thuộc tính
Lấy và đặt định dạng của bảng tính.
public FileFormatType SaveFormat { get; set; }
Giá trị thuộc tính
FileFormatType
Class HtmlConverter
Thông tin
Bộ chuyển đổi cho việc chuyển đổi giữa các tệp html (html, mht, …) và các định dạng tệp bảng tính khác.
public class HtmlConverter
Kế thừa
object ←
HtmlConverter
Các thành viên kế thừa
Ví dụ
1HtmlConverter converter = new HtmlConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.xlsx";
4HtmlSaveOptions saveOptions = new HtmlSaveOptions();
5saveOptions.OutputFile = "res.html";
6converter.Process(loadOptions, saveOptions);
Các hàm tạo
HtmlConverter()
Các phương thức
Process(LoadOptions, HtmlSaveOptions)
Chuyển đổi tệp giữa html và các định dạng tệp bảng tính khác.
public void Process(LoadOptions loadOptions, HtmlSaveOptions saveOptions)
Tham số
Class HtmlSaveOptions
public class HtmlSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
HtmlSaveOptions
Các thành viên được kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm khởi tạo
HtmlSaveOptions()
Thuộc tính
Lấy và thiết lập định dạng của bảng tính.
public FileFormatType SaveFormat { get; set; }
Giá trị thuộc tính
FileFormatType
Class ImageConverter
Thông tin
Bộ chuyển đổi để chuyển đổi tệp mẫu sang pdf.
public class ImageConverter
Kế thừa
object ←
ImageConverter
Các thành viên được kế thừa
Ví dụ
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);
Các bộ dựng
ImageConverter()
Phương thức
Process(LoadOptions, ImageSaveOptions)
Chuyển đổi tệp mẫu thành hình ảnh
public void Process(LoadOptions loadOptions, ImageSaveOptions saveOptions)
Tham số
Class ImageSaveOptions
Thông tin
Tùy chọn để lưu hình ảnh.
public class ImageSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
ImageSaveOptions
Thành viên kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm khởi tạo
ImageSaveOptions()
public ImageSaveOptions()
Thuộc tính
HorizontalResolution
Lấy hoặc đặt độ phân giải ngang cho hình ảnh được tạo, tính bằng điểm trên mỗi inch.
public int HorizontalResolution { get; set; }
Giá trị thuộc tính
int
Nhận xét
Giá trị mặc định là 96.
Việc thiết lập Sheetize.ImageSaveOptions.HorizontalResolution và Sheetize.ImageSaveOptions.VerticalResolution
ảnh hưởng đến chiều rộng và chiều cao của hình ảnh đầu ra tính bằng pixel.
ImageType
Lấy hoặc đặt định dạng của hình ảnh được tạo.
Giá trị mặc định là Sheetize.ImageType.Png.
public ImageType ImageType { get; set; }
Giá trị thuộc tính
ImageType
OnePagePerSheet
Nếu OnePagePerSheet là true, tất cả nội dung của một trang sẽ chỉ xuất ra một trang trong kết quả.
Kích thước giấy được xác định bởi PageSetup sẽ bị bỏ qua, nhưng các thiết lập khác của PageSetup vẫn có hiệu lực.
public bool OnePagePerSheet { get; set; }
Giá trị thuộc tính
bool
VerticalResolution
Lấy hoặc đặt độ phân giải dọc cho hình ảnh được tạo, tính bằng điểm trên mỗi inch.
public int VerticalResolution { get; set; }
Giá trị thuộc tính
int
Nhận xét
Giá trị mặc định là 96.
Việc thiết lập Sheetize.ImageSaveOptions.HorizontalResolution và Sheetize.ImageSaveOptions.VerticalResolution
ảnh hưởng đến chiều rộng và chiều cao của hình ảnh đầu ra tính bằng pixel.
Các phương thức
Finish(Stream)
Kết thúc việc ghi dữ liệu vào luồng.
Theo mặc định, phương thức này chỉ đóng luồng trực tiếp (bao gồm cả trường hợp mà
luồng là luồng được chỉ định bởi Sheetize.SaveOptions.OutputStream).
Người dùng có thể ghi đè phương thức này để kiểm soát cách giải phóng tài nguyên
theo yêu cầu của họ và cách thực hiện của Sheetize.ImageSaveOptions.GetStream(System.Int32).
public virtual void Finish(Stream stream)
Tham số
stream
Stream: luồng đã hoàn thành tác vụ của nó (lưu dữ liệu vào)
GetStream(int)
Lấy luồng để lưu hình ảnh.
public virtual Stream GetStream(int pageIndex)
Tham số
pageIndex
int: trang để render thành hình ảnh
Trả về
Stream : Luồng để ghi hình ảnh được tạo vào.
Nhận xét
Theo mặc định, nếu Sheetize.SaveOptions.OutputStream đã được chỉ định và có hiệu lực,
thì phương thức này luôn trả về luồng được chỉ định. Người dùng nên ghi đè phương thức này trong cài đặt của mình
của lớp này để cung cấp các đối tượng luồng khác nhau và phù hợp cho đầu ra đa trang.
Nếu Sheetize.SaveOptions.OutputFile đã được chỉ định và có hiệu lực,
nếu chỉ có một trang hình ảnh, thì đường dẫn đã chỉ định (tệp) sẽ được sử dụng trực tiếp làm đầu ra;
nếu không, chỉ số trang sẽ được thêm vào tên tệp và sau đó trả về FileStream được xây dựng từ tệp.
Ví dụ, nếu đường dẫn đầu ra được chỉ định là res.png, thì các hình ảnh được tạo sẽ là res0.png, res1.png, …
Class JsonConverter
Thông tin
Bộ chuyển đổi cho việc chuyển đổi giữa dữ liệu json và các định dạng tệp bảng tính khác.
public class JsonConverter
Kế thừa
object ←
JsonConverter
Các thành viên kế thừa
Ví dụ
1JsonConverter converter = new JsonConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "data.json";
4JsonSaveOptions saveOptions = new JsonSaveOptions();
5saveOptions.OutputFile = "res.xlsx";
6converter.Process(loadOptions, saveOptions);
Các hàm khởi tạo
JsonConverter()
Các phương thức
Process(LoadOptions, JsonSaveOptions)
Chuyển đổi giữa dữ liệu json và các định dạng tệp bảng tính khác.
public void Process(LoadOptions loadOptions, JsonSaveOptions saveOptions)
Tham số
Class JsonSaveOptions
public class JsonSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
JsonSaveOptions
Thành viên kế thừa
- 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()
Thuộc tính
Lấy và đặt định dạng của bảng tính.
public FileFormatType SaveFormat { get; set; }
Giá trị thuộc tính
FileFormatType
Class License
Kế thừa
object ←
License
Các thành viên kế thừa
Ví dụ
1Sheetize.License license = new Sheetize.License();
2license.SetLicense("mylic.lic");
Các bộ khởi tạo
License()
Các phương thức
SetLicense(Stream)
Cấp phép sản phẩm bằng Stream cung cấp dữ liệu giấy phép.
public void SetLicense(Stream stream)
Tham số
SetLicense(string)
Cấp phép sản phẩm bằng tệp giấy phép.
public void SetLicense(string licenseName)
Tham số
Class LoadOptions
Kế thừa
object ←
LoadOptions
Kế thừa
Thành viên kế thừa
Hàm tạo
LoadOptions()
Thuộc tính
Lấy và thiết lập tệp (với đường dẫn nếu cần) của mẫu.
public string InputFile { get; set; }
Giá trị thuộc tính
string
Nhận xét
Khi thiết lập một đường dẫn không null và không rỗng cho thuộc tính này,
giá trị trước đó được thiết lập cho Sheetize.LoadOptions.InputStream sẽ bị bỏ qua.
Lấy và thiết lập Stream của mẫu.
public Stream InputStream { get; set; }
Giá trị thuộc tính
Stream
Nhận xét
Khi thiết lập một Stream không null cho thuộc tính này,
giá trị trước đó được thiết lập cho Sheetize.LoadOptions.InputFile sẽ bị bỏ qua.
Class MergerLoadOptions
Thông tin
Tùy chọn cho việc hợp nhất nhiều file.
public class MergerLoadOptions : LoadOptions
Kế thừa
object ←
LoadOptions ←
MergerLoadOptions
Thành viên kế thừa
- LoadOptions.InputFile,
- LoadOptions.InputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm xây dựng
MergerLoadOptions()
public MergerLoadOptions()
Các thuộc tính
Lấy/thay đổi các luồng đầu vào từ đó để tải dữ liệu và hợp nhất.
public IEnumerator InputStreamEnumerator { get; set; }
Giá trị thuộc tính
IEnumerator
Các phương thức
Finish(Stream)
Kết thúc việc tải dữ liệu từ luồng (lấy từ Sheetize.MergerLoadOptions.InputStreamEnumerator).
Mặc định, phương thức này chỉ đóng luồng trực tiếp
Người dùng có thể ghi đè phương thức này để điều khiển cách giải phóng tài nguyên
theo yêu cầu của họ và việc thực hiện của Sheetize.MergerLoadOptions.InputStreamEnumerator.
public virtual void Finish(Stream stream)
Tham số
stream
Stream: luồng đã hoàn thành nhiệm vụ của nó (lưu dữ liệu đến)
Class PdfConverter
Thông tin
Bộ chuyển đổi để chuyển đổi tệp mẫu sang pdf.
public class PdfConverter
Kế thừa
object ←
PdfConverter
Các thành viên kế thừa
Ví dụ
1
2
3PdfConverter converter = new PdfConverter();
4LoadOptions loadOptions = new LoadOptions();
5loadOptions.InputFile = "Template.xlsx";
6PdfSaveOptions saveOptions = new PdfSaveOptions();
7saveOptions.OutputFile = "res.pdf";
8converter.Process(loadOptions, saveOptions);
Các phương thức khởi tạo
PdfConverter()
Các phương thức
Process(LoadOptions, PdfSaveOptions)
Chuyển đổi tệp mẫu sang pdf
public void Process(LoadOptions loadOptions, PdfSaveOptions saveOptions)
Tham số
Class PdfSaveOptions
public class PdfSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
PdfSaveOptions
Các thành viên kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm xây dựng
PdfSaveOptions()
Class SaveOptions
Kế thừa
object ←
SaveOptions
Kế thừa
Thành viên kế thừa
Constructors
SaveOptions()
Thuộc tính
OutputFile
Lấy và thiết lập file (với đường dẫn nếu cần) để lưu dữ liệu được tạo ra.
Khi thiết lập thuộc tính này với giá trị khác null hoặc chuỗi rỗng, Sheetize.SaveOptions.OutputStream sẽ bị bỏ qua.
public string OutputFile { get; set; }
Giá trị thuộc tính
string
OutputStream
Lấy và thiết lập Stream để ghi dữ liệu được tạo ra.
Khi thiết lập thuộc tính này với giá trị khác null, Sheetize.SaveOptions.OutputFile sẽ bị bỏ qua.
public Stream OutputStream { get; set; }
Giá trị thuộc tính
Stream
Class SheetizeException
Thông tin
Ngoại lệ được ném ra khi xảy ra lỗi được chỉ định bởi Aspose.Cells.
public class SheetizeException : ApplicationException, ISerializable, _Exception
Kế thừa
object ←
Exception ←
ApplicationException ←
SheetizeException
Thực hiện
Các thành viên kế thừa
- 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()
Thuộc tính
Mã
Đại diện cho mã ngoại lệ tùy chỉnh.
public ExceptionType Code { get; }
Giá trị thuộc tính
ExceptionType
Class SplitterSaveOptions
Thông tin
Tùy chọn để chia tách tệp mẫu.
public class SplitterSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
SplitterSaveOptions
Các thành viên kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm tạo
SplitterSaveOptions()
public SplitterSaveOptions()
Các thuộc tính
Lấy và thiết lập định dạng của bảng tính.
public FileFormatType SaveFormat { get; set; }
Giá trị thuộc tính
FileFormatType
Các phương thức
Finish(Stream)
Kết thúc việc ghi dữ liệu vào luồng.
Theo mặc định, phương thức này chỉ đóng luồng trực tiếp (bao gồm cả trường hợp
luồng là luồng được chỉ định bởi Sheetize.SaveOptions.OutputStream).
Người dùng có thể ghi đè phương thức này để kiểm soát cách giải phóng tài nguyên
theo yêu cầu của họ và việc thực hiện của Sheetize.SplitterSaveOptions.GetStream(System.Int32).
public virtual void Finish(Stream stream)
Tham số
stream
Stream: luồng đã hoàn thành các nhiệm vụ của nó (lưu dữ liệu vào)
GetStream(int)
Lấy luồng để lưu phần đã chia.
public virtual Stream GetStream(int sn)
Tham số
sn
int: số thứ tự của phần đã chia, bắt đầu từ 0.
Trả về
Stream : Luồng để ghi phần đã chia vào.
Nhận xét
Theo mặc định, nếu Sheetize.SaveOptions.OutputStream đã được chỉ định và có hiệu lực,
thì phương thức này luôn trả về luồng đã chỉ định. Người dùng nên ghi đè phương thức này trong việc thực hiện riêng của mình
của lớp này để cung cấp các đối tượng luồng khác nhau và phù hợp cho đầu ra nhiều phần.
Nếu Sheetize.SaveOptions.OutputFile đã được chỉ định và có hiệu lực,
thì số thứ tự sẽ được thêm vào tên tệp và sau đó trả về FileStream được xây dựng từ tệp.
Ví dụ, nếu đường dẫn đầu ra được chỉ định là res.xlsx, thì các tệp được tạo ra sẽ là res0.xlsx, res1.xlsx,…
Class SpreadsheetConverter
Thông tin
Bộ chuyển đổi cho chuyển đổi giữa các định dạng tệp bảng tính khác nhau, chẳng hạn như xls, xlsx, xlsb, ods, spreadsheet ml…
public class SpreadsheetConverter
Kế thừa
object ←
SpreadsheetConverter
Thành viên kế thừa
Ví dụ
1SpreadsheetConverter converter = new SpreadsheetConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.xlsx";
4SpreadsheetSaveOptions saveOptions = new SpreadsheetSaveOptions();
5saveOptions.OutputFile = "res.xlsb";
6converter.Process(loadOptions, saveOptions);
Các hàm khởi tạo
SpreadsheetConverter()
public SpreadsheetConverter()
Phương thức
Process(LoadOptions, SpreadsheetSaveOptions)
Chuyển đổi giữa các định dạng tệp bảng tính khác nhau.
public void Process(LoadOptions loadOptions, SpreadsheetSaveOptions saveOptions)
Tham số
Class SpreadsheetMerger
Thông tin
Hợp nhất nhiều tệp mẫu thành một.
public class SpreadsheetMerger
Kế thừa
object ←
SpreadsheetMerger
Các thành viên được kế thừa
Ví dụ
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);
Các bộ khởi tạo
SpreadsheetMerger()
public SpreadsheetMerger()
Các phương thức
Process(MergerLoadOptions, SpreadsheetSaveOptions)
public void Process(MergerLoadOptions loadOptions, SpreadsheetSaveOptions saveOptions)
Tham số
Class SpreadsheetSaveOptions
Thông tin
Tùy chọn để lưu bảng tính.
public class SpreadsheetSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
SpreadsheetSaveOptions
Thành viên kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm khởi tạo
SpreadsheetSaveOptions()
public SpreadsheetSaveOptions()
Thuộc tính
Lấy và thiết lập định dạng của bảng tính.
public FileFormatType SaveFormat { get; set; }
Giá trị thuộc tính
FileFormatType
Class SpreadsheetSplitter
Thông tin
Chia tệp bảng tính thành nhiều phần.
public class SpreadsheetSplitter
Kế thừa
object ←
SpreadsheetSplitter
Các thành viên kế thừa
Ví dụ
1
2
3private class MySplitterSaveOptions : SplitterSaveOptions
4{
5 private const string ResultBase = "result/splitter/";
6 public override Stream GetStream(int sn)
7 {
8 return File.Create(ResultBase + "part_" + sn + ".xlsx");
9 }
10}
11SpreadsheetSplitter splitter = new SpreadsheetSplitter();
12LoadOptions loadOptions = new LoadOptions();
13loadOptions.InputFile = "Template.xlsx";
14MySplitterSaveOptions saveOptions = new MySplitterSaveOptions();
15splitter.Process(loadOptions, saveOptions);
Các hàm khởi tạo
SpreadsheetSplitter()
public SpreadsheetSplitter()
Phương thức
Process(LoadOptions, SplitterSaveOptions)
public void Process(LoadOptions loadOptions, SplitterSaveOptions saveOptions)
Tham số
Class SpreadsheetUnlocker
public class SpreadsheetUnlocker
Kế thừa
object ←
SpreadsheetUnlocker
Các thành viên được kế thừa
Ví dụ
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);
Các hàm khởi tạo
SpreadsheetUnlocker()
public SpreadsheetUnlocker()
Các phương thức
Process(UnlockerLoadOptions, SpreadsheetSaveOptions)
public void Process(UnlockerLoadOptions loadOptions, SpreadsheetSaveOptions saveOptions)
Các tham số
Class TextConverter
Thông tin
Bộ chuyển đổi cho việc chuyển đổi giữa các định dạng dựa trên văn bản (csv, markdown, dif…) và các định dạng tệp bảng tính khác.
public class TextConverter
Kế thừa
object ←
TextConverter
Thành viên Kế thừa
Ví dụ
1TextConverter converter = new TextConverter();
2LoadOptions loadOptions = new LoadOptions();
3loadOptions.InputFile = "Template.csv";
4TextSaveOptions saveOptions = new TextSaveOptions();
5saveOptions.OutputFile = "res.xlsx";
6converter.Process(loadOptions, saveOptions);
Các hàm tạo
TextConverter()
Phương thức
Process(LoadOptions, TextSaveOptions)
Chuyển đổi định dạng tệp giữa các định dạng dựa trên văn bản và các định dạng tệp bảng tính khác
public void Process(LoadOptions loadOptions, TextSaveOptions saveOptions)
Tham số
Class TextSaveOptions
Thông tin
Tùy chọn để lưu .SQL, .MD, .CSV, .TSV, .TXT, .XML, .DIF.
public class TextSaveOptions : SaveOptions
Kế thừa
object ←
SaveOptions ←
TextSaveOptions
Các thành viên kế thừa
- SaveOptions.OutputFile,
- SaveOptions.OutputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm khởi tạo
TextSaveOptions()
Các thuộc tính
SaveFormat
Lấy và đặt định dạng của bảng tính.
public FileFormatType SaveFormat { get; set; }
Giá trị thuộc tính
FileFormatType
Class UnlockerLoadOptions
Thông tin
Tùy chọn để mở khóa các tệp excel.
public class UnlockerLoadOptions : LoadOptions
Kế thừa
object ←
LoadOptions ←
UnlockerLoadOptions
Các thành viên được kế thừa
- LoadOptions.InputFile,
- LoadOptions.InputStream,
- object.ToString(),
- object.Equals(object),
- object.Equals(object, object),
- object.ReferenceEquals(object, object),
- object.GetHashCode(),
- object.GetType(),
- object.MemberwiseClone()
Các hàm tạo
UnlockerLoadOptions()
public UnlockerLoadOptions()
Thuộc tính
Password
Mật khẩu để mở tệp.
public string Password { get; set; }
Giá trị thuộc tính
string
PasswordToModify
Mật khẩu để chỉnh sửa tệp.
public string PasswordToModify { get; set; }
Giá trị thuộc tính
string
PasswordToUnprotectWorkbook
Mật khẩu để gỡ bảo vệ workbook.
public string PasswordToUnprotectWorkbook { get; set; }
Giá trị thuộc tính
string
PasswordToUnprotectWorksheet
Mật khẩu để gỡ bảo vệ worksheet.
public string PasswordToUnprotectWorksheet { get; set; }
Giá trị thuộc tính
string
Enum ExceptionType
Thông tin
Đại diện cho mã loại ngoại lệ tùy chỉnh.
public enum ExceptionType
Fields
DataType = 0
: Cài đặt loại dữ liệu không hợp lệ.FileCorrupted = 13
: Nội dung tệp bị hỏng.FileFormat = 1
: Định dạng tệp không hợp lệ.IO = 8
: Tệp không hợp lệ.IncorrectPassword = 4
: Mật khẩu không chính xác.Interrupted = 7
: Quy trình bị gián đoạn.InvalidData = 2
: Dữ liệu không hợp lệ.InvalidOperator = 3
: Toán tử không hợp lệ.License = 5
: Lỗi liên quan đến giấy phép.Limitation = 6
: Lỗi vượt quá giới hạn của MS Excel.Permission = 9
: Cần có quyền để mở tệp này.UndisclosedInformation = 12
: Tệp có chứa một số thông tin không được tiết lộ.UnsupportedFeature = 10
: Tính năng không được hỗ trợ.UnsupportedStream = 11
: Luồng không được hỗ trợ để mở.
Thông tin
Đại diện cho các định dạng tệp được hỗ trợ cho việc chuyển đổi.
public enum FileFormatType
Fields
Auto = 0
: Nếu lưu tệp vào ổ đĩa, định dạng tệp sẽ tương ứng với phần mở rộng của tên tệp. Nếu lưu tệp vào luồng, định dạng tệp là xlsx.Azw3 = 773
: Đại diện cho tệp Azw3.Bmp = 263
: Bitmap WindowsCsv = 1
: Tệp văn bản giá trị phân tách bằng dấu phẩy (CSV).Dif = 30
: Định dạng trao đổi dữ liệu.Docx = 62
: Đại diện cho tệp .docx.Emf = 258
: Metafile mở rộng Windows.Epub = 772
: Đại diện cho tệp Epub.Excel97To2003 = 5
: Đại diện cho tệp Excel97-2003 xls.Fods = 59
: Đại diện cho định dạng tệp OpenDocument Flat XML Spreadsheet (.fods).Gif = 322
: GifHtml = 12
: Đại diện cho tệp html.Jpg = 261
: JPEG JFIF.Json = 513
: JsonMHtml = 17
: Đại diện cho tệp mhtml.Markdown = 57
: Đại diện cho tài liệu markdown.Numbers = 56
: Đại diện cho tệp numbers. Không được hỗ trợ.Ods = 14
: Tệp Open Document Sheet (ODS).Ots = 31
: Tệp Open Document Template Sheet (OTS).Pdf = 13
: Đại diện cho tệp Pdf.Png = 262
: Đồ họa mạng di động.Pptx = 61
: Đại diện cho tệp .pptx.SpreadsheetML = 15
: Đại diện cho tệp xml Excel 2003.SqlScript = 514
: SqlSvg = 28
: Tệp SVG.Sxc = 60
: Đại diện cho định dạng tệp StarOffice Calc Spreadsheet (.sxc).TabDelimited = 11
: Đại diện cho tệp văn bản phân tách bằng tab, giống với Sheetize.FileFormatType.Tsv.Tiff = 21
: Đại diện cho tệp TIFF.Tsv = 11
: Tệp văn bản giá trị phân tách bằng tab (TSV).Unknown = 255
: Đại diện cho định dạng không xác định, không thể lưu.XHtml = 771
: Đại diện cho tệp XHtml.Xlam = 10
: Đại diện cho tệp xltm cho phép macro add-in.Xlsb = 16
: Đại diện cho tệp xlsb.Xlsm = 7
: Đại diện cho tệp xlsm cho phép macro.Xlsx = 6
: Đại diện cho tệp xlsx.Xlt = 32
: Tệp mẫu Excel 97-2003.Xltm = 9
: Đại diện cho tệp xltm cho phép macro.Xltx = 8
: Đại diện cho tệp xltx.Xml = 51
: Đại diện cho tệp xml đơn giản.Xps = 20
: Định dạng XPS (XML Paper Specification).
Enum ImageType
Thông tin
Chỉ định loại (định dạng) của một hình ảnh.
Fields
Bmp = 7
: Bitmap WindowsEmf = 2
: Tệp Metafile Mở Rộng Windows.Gif = 66
: GifJpeg = 5
: JPEG JFIF.OfficeCompatibleEmf = 71
: Tệp Metafile Mở Rộng Windows tương thích hơn với Office.Pict = 4
: PICT Macintosh.Png = 6
: Đồ họa Mạng Di động.Svg = 68
: SvgSvm = 69
: SvmTiff = 67
: TiffUnknown = 0
: Một loại hình ảnh không xác định.WebP = 72
: Định dạng hình ảnh WeppyWmf = 3
: Metafile Windows.