今天,我在获取excel上次保存date.Its而不是修改date.Any帮助时卡住了,非常感谢。我尝试按照代码来保存上次保存日期而不是创建日期,但我不能让它work.Could任何人确认下面的方法对他们有效?
DSOFile.OleDocumentPropertiesClass oleDocumentPropertiesClass = new DSOFile.OleDocumentPropertiesClass();
oleDocumentPropertiesClass.Open("C:\\My Documents\\MyExcelFile.xls");
MessageBox.Show(oleDocumentPropertiesClass.SummaryProperties.DateCreated.ToString());
发布于 2018-12-18 22:36:51
您可以在不使用Office库的情况下,通过检查文件系统中文件的上次修改日期来完成此操作:
using System.IO;
var time = new FileInfo(@"C:\My Documents\MyExcelFile.xls").LastWriteTime;
https://stackoverflow.com/questions/53835206
复制相似问题