使用VBA(Excel)从类型msoMetaPropertyTypeUser读取ContentTypeProperties
我使用Sharepoint创建了一个新的Excel工作表。在这张表中有很多元属性。 现在我想用创建者的用户名更新一个单元格。但Excel无法访问此属性 如何从类型user读取元属性 请帮忙使用VBA(Excel)从类型msoMetaPropertyTypeUser读取ContentTypeProperties,excel,sharepoint,vba,metadata,Excel,Sharepoint,Vba,Metadata,我使用Sharepoint创建了一个新的Excel工作表。在这张表中有很多元属性。 现在我想用创建者的用户名更新一个单元格。但Excel无法访问此属性 如何从类型user读取元属性 请帮忙 编辑:我的属性在ContentTypeProperties集合中可能是您可以使用书中的CustomXMLParts。该行从工作簿访问自定义xml部分 string value = null; string fullPath = "D:\\example.xlsx";
编辑:我的属性在ContentTypeProperties集合中可能是您可以使用书中的CustomXMLParts。该行从工作簿访问自定义xml部分
string value = null;
string fullPath = "D:\\example.xlsx";
Application app = new Application();
Workbook book = app.Workbooks.Open(fullPath, Type.Missing, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
CustomXMLParts obj = book.CustomXMLParts;
foreach (CustomXMLPart xml in obj)
{
value = xml.XML;
}