ContentTypePropertyCollection
内容
[
隐藏
]ContentTypePropertyCollection class
集合ContentTypeProperty
表示附加信息的对象。
public class ContentTypePropertyCollection : CollectionBase<ContentTypeProperty>
特性
姓名 | 描述 |
---|---|
Capacity { get; set; } | |
Count { get; } | |
Item { get; } | 通过特定索引获取内容类型属性。 (2 indexers) |
Item { get; set; } |
方法
姓名 | 描述 |
---|---|
Add(string, string) | 添加内容类型属性信息。 |
Add(string, string, string) | 添加内容类型属性信息。 |
BinarySearch(ContentTypeProperty) | |
BinarySearch(ContentTypeProperty, IComparer<ContentTypeProperty>) | |
BinarySearch(int, int, ContentTypeProperty, IComparer<ContentTypeProperty>) | |
Clear() | |
Contains(ContentTypeProperty) | |
CopyTo(ContentTypeProperty[]) | |
CopyTo(ContentTypeProperty[], int) | |
CopyTo(int, ContentTypeProperty[], int, int) | |
Exists(Predicate<ContentTypeProperty>) | |
Find(Predicate<ContentTypeProperty>) | |
FindAll(Predicate<ContentTypeProperty>) | |
FindIndex(Predicate<ContentTypeProperty>) | |
FindIndex(int, Predicate<ContentTypeProperty>) | |
FindIndex(int, int, Predicate<ContentTypeProperty>) | |
FindLast(Predicate<ContentTypeProperty>) | |
FindLastIndex(Predicate<ContentTypeProperty>) | |
FindLastIndex(int, Predicate<ContentTypeProperty>) | |
FindLastIndex(int, int, Predicate<ContentTypeProperty>) | |
GetEnumerator() | |
IndexOf(ContentTypeProperty) | |
IndexOf(ContentTypeProperty, int) | |
IndexOf(ContentTypeProperty, int, int) | |
LastIndexOf(ContentTypeProperty) | |
LastIndexOf(ContentTypeProperty, int) | |
LastIndexOf(ContentTypeProperty, int, int) | |
RemoveAt(int) |
例子
[C#]
//实例化一个工作簿对象
Workbook workbook = new Workbook();
//添加一个新属性。
workbook.ContentTypeProperties.Add("Admin", "Aspose", "text");
//保存Excel文件
workbook.Save("book1.xlsm");
[Visual Basic]
'实例化工作簿对象
Dim workbook As Workbook = New Workbook()
'添加新属性。
workbook.ContentTypeProperties.Add("Admin", "Aspose", "text")
'保存 Excel 文件
workbook.Save("book1.xlsm")
也可以看看
- class CollectionBase<T>
- class ContentTypeProperty
- 命名空间 Aspose.Cells.Properties
- 部件 Aspose.Cells