本文整理汇总了C#中Variant.Append方法的典型用法代码示例。如果您正苦于以下问题:C# Variant.Append方法的具体用法?C# Variant.Append怎么用?C# Variant.Append使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Variant
的用法示例。
在下文中一共展示了Variant.Append方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: generateExtendedFilePropertiesPartContent
private void generateExtendedFilePropertiesPartContent(ExtendedFilePropertiesPart extendedFilePropertiesPart)
{
var properties = new Properties();
properties.AddNamespaceDeclaration("vt", "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes");
var application = new Application { Text = "Microsoft Excel" };
var documentSecurity = new DocumentSecurity { Text = "0" };
var scaleCrop = new ScaleCrop { Text = "false" };
var headingPairs = new HeadingPairs();
var vTVector1 = new VTVector { BaseType = VectorBaseValues.Variant, Size = 2 };
var variant1 = new Variant();
var vTLPSTR1 = new VTLPSTR { Text = "Листы" };
variant1.Append(vTLPSTR1);
var variant2 = new Variant();
var vTInt321 = new VTInt32 { Text = "1" };
variant2.Append(vTInt321);
vTVector1.Append(variant1);
vTVector1.Append(variant2);
headingPairs.Append(vTVector1);
var titlesOfParts = new TitlesOfParts();
var vTVector2 = new VTVector { BaseType = VectorBaseValues.Lpstr, Size = 1 };
var vTLPSTR2 = new VTLPSTR { Text = "Документ" };
vTVector2.Append(vTLPSTR2);
titlesOfParts.Append(vTVector2);
var linksUpToDate = new LinksUpToDate { Text = "false" };
var sharedDocument = new SharedDocument { Text = "false" };
var hyperlinksChanged = new HyperlinksChanged { Text = "false" };
var applicationVersion = new ApplicationVersion { Text = "14.0300" };
properties.Append(application);
properties.Append(documentSecurity);
properties.Append(scaleCrop);
properties.Append(headingPairs);
properties.Append(titlesOfParts);
properties.Append(linksUpToDate);
properties.Append(sharedDocument);
properties.Append(hyperlinksChanged);
properties.Append(applicationVersion);
extendedFilePropertiesPart.Properties = properties;
}