使用 VBA (Excel) 从类型 msoMetaPropertyTypeUser 读取 ContentTypePropeties

发布于 2025-01-07 21:10:14 字数 169 浏览 1 评论 0原文

我用 Sharepoint 创建一个新的 Excelsheet。在此表中有很多元属性。 现在我想用创建者的用户名更新一个单元格。但 Excel 无法访问此属性。

我如何从“用户”类型读取元属性。

请帮忙!

编辑:我的属性位于 ContentTypeProperties 集合中

i create a new Excelsheet with Sharepoint. In this sheet there are a lot of meta properties.
Now i want to update a cell with the username of the creator. But Excel had no access on this property.

How can i read a meta property from type "user".

Please help !

Edit: my property is in ContentTypeProperties collection

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

淡写薰衣草的香 2025-01-14 21:10:14

也许您可以使用书中的 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;

        }

May be you can use the CustomXMLParts in the book.The line access the custom xml parts from the workbook.

        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;

        }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文