无法获取customproperties的PropertyDescription [英] Unable to get PropertyDescription for customproperties

查看:96
本文介绍了无法获取customproperties的PropertyDescription的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们使用

PROPERTYKEY键枚举IPropertyStore界面时;

hr = pps-> GetAt(i,& key);

PROPERTYKEY key;
hr = pps->GetAt(i, &key);

我们获取xlsx文档中其中一个自定义属性的密钥为

We get key for one of the custom property in xlsx document as

来自key = {的字符串D5CDD505-2E9C-101B-9397-08002B2CF9AE} 2

String from key = {D5CDD505-2E9C-101B-9397-08002B2CF9AE} 2

给出的自定义属性名称为"Test"

The custom property name given is "Test"

如何将密钥与自定义属性的名称相关联。

How to relate the key with the name of the custom property.

如果我使用PSGetPropertyDescription(密钥,IID_PPV_ARGS(& ppd));

If I use PSGetPropertyDescription(key, IID_PPV_ARGS(&ppd));

我发现Element not found错误。

I get Element not found error.

无论如何都要使用PS *****函数找到名字?

Is there anyway to use PS***** functions to find the name?

谢谢和问候,

R。 Senthil

R.Senthil

推荐答案

>>无论如何使用PS *****函数来查找名称?<<

根据你的描述,我想你想要从xlsx文件中获取自定义属性。

According to your description, I think you want to get custom properties from an xlsx file.

可能没有Windows 函数直接获取xlsx文件的自定义属性。我建议您使用
Excel对象模型 Open XML SDK 来操作Excel spreadsheat以获取其自定义属性。

There may be no Windows function to get the custom property of xlsx files directly. I suggest you resorting to Excel Object Model or Open XML SDK to operate the Excel spreadsheat to get its custom properties.

如果您已安装Excel应用程序,则可以使用
DocumentProperty对象
实现目标。

If you have installed the Excel application, you could use the DocumentProperty Object to achieve the goal.

以下是关于Word的Open XML SDK示例,并且Excel应该类似:

Below is an Open XML SDK sample about Word, and Excel should be similar:

使用Open XML SDK 2.0从Word 2010文档中检索自定义属性


这篇关于无法获取customproperties的PropertyDescription的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆