简体   繁体   English

如何使用Java检查Excel文件中是否有更新

[英]How can I check if there is an update in Excel file using java

Program which will run every 1 hour and check if there is any update in the excel file . 该程序将每1小时运行一次,并检查excel文件中是否有任何更新。 If there is any , update the corresponding entry in DB 如果有,请更新数据库中的相应条目

只需检查file.lastModified(),这将返回长对象并将其与(当前系统时间,以Millis为单位-3600000)进行比较,如果上次修改的时间大于上述时间,则该文件将在最近1小时内更新,然后执行相应地进行处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM