我在打开应用程序时无法获取 powerpoint 和 excel 的元数据

问题描述

我在打开应用程序时无法获取 powerpoint 和 excel 的元数据,但我可以在 word 文件获取元数据信息。如何在第一次启动时获取excel和powerpoint的元数据信息

 public string ReadWorkbookProperty(string propertyName)
    {
        try
        {
            DocumentProperties properties;


            var wb = _activeBook;
           
            if (wb is null)
            {
                return "";
            }
            properties = (DocumentProperties)wb.CustomDocumentProperties;

            foreach (DocumentProperty prop in properties)
            {
                if (prop.Name == propertyName)
                {
                    return prop.Value.ToString();
                }
            }
            return null;
        }
        catch (Exception)
        {

            return null;
        }
    }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)