获取内容创建日期的Excel文件 [英] getting content-created-date of an excel file
问题描述
我的目标是显示一个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());
这篇关于获取内容创建日期的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!