获取内容创建日期的Excel文件 [英] getting content-created-date of an excel file

查看:253
本文介绍了获取内容创建日期的Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是显示一个excel文件的日期。
但是:
如果我从互联网下载文件,则自动创建日期和修改日期设置为当前时间和日期。
我查看了文件的属性,发现在细节一节中,在个人信息下,有一个名为源的部分,它有一个名为
'Content Created'的属性原始日期文件。

My goal is to display the date of an excel file. But : If I download the file from the internet , automaitclly the creation date and modify date are set to current time and date. I looked upon the file's properties , and found that in section 'Details' , under personal infomation , there is a section called 'Source' and there , it has a property called ' Content Created ' with the original date file.

有没有办法得到一个字符串?

Is there a way to get it to a string ??

谢谢。

推荐答案

您可以使用Microsoft DSO OLE文档属性阅读器来获取此信息。

You can use the Microsoft DSO OLE Document Properties Reader to get this.

DSOFile.OleDocumentPropertiesClass oleDocumentPropertiesClass = new DSOFile.OleDocumentPropertiesClass();
oleDocumentPropertiesClass.Open("C:\\My Documents\\MyExcelFile.xls");
MessageBox.Show(oleDocumentPropertiesClass.SummaryProperties.DateCreated.ToString());

DSO文件可以从 http://support.microsoft.com/default .aspx?scid = http://support.microsoft.com:80 / support / kb / articles / Q224 / 3 / 51.asp

这篇关于获取内容创建日期的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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