简体   繁体   English

实时Excel更新

[英]Real-Time Excel Updates

I have a third party application that updates cell values by opening the excel file, setting values in cells, and writing (saving) the excel file. 我有一个第三方应用程序,通过打开Excel文件,设置单元格中的值,以及写入(保存)Excel文件来更新单元格值。 Suppose I have the excel spreadsheet open at all times, how I do have the spreadsheet reflect these changes in real-time? 假设我一直打开excel电子表格,我如何让电子表格实时反映这些变化?

Every time there is an update, I have to re-open the excel file to see the new changes. 每次有更新时,我都必须重新打开excel文件才能看到新的更改。

PS. PS。 I am using the Apache POI. 我正在使用Apache POI。

Thank you. 谢谢。

You cannot do this using Apache POI. 您无法使用Apache POI执行此操作。 If you have an Excel spreadsheet open in Excel, then you will get a FileNotFoundException if you attempt to write your changes to that file. 如果您在Excel中打开了Excel电子表格,那么如果您尝试将更改写入该文件,则会收到FileNotFoundException At least on Windows, you will get something like this: 至少在Windows上,你会得到这样的东西:

java.io.FileNotFoundException: MySpreadsheet.xlsx (The process cannot access the
file because it is being used by another process)

Additionally, even if this worked, there is nothing in the Apache POI API that interacts with the Excel application itself, so you cannot tell Excel to re-open the spreadsheet. 此外,即使这样可行,Apache POI API中也没有任何内容与Excel应用程序本身交互,因此您无法告诉Excel重新打开电子表格。

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

相关问题 具有实时传感器更新的android listview - android listview with real-time sensor updates 当时间比较评估为真时,如何实时更新 Java 中的 Excel.csv 文件? - How to make real-time updates of an Excel .csv file in Java when time comparison evaluates as true? 基于通知的实时PostgreSQL客户端更新 - Real-Time PostgreSQL client updates based on notification 如何监听 Firestore 中文档列表的实时更新? - How to listen for real-time updates on a list of documents in Firestore? 与Facebook Graph Api集成-没有实时更新的更新机制 - Integration with Facebook Graph Api - update mechanism without Real-Time Updates 应用更新 firebase 实时数据库中的数据,但在 recyclerview 中不显示任何内容 - App updates data in firebase real-time database but doesn't show anything in recyclerview 关于twitter如何将其tweet保存在数据库中并实时更新的任何想法/猜测 - Any Idea/guess of how twitter saves its tweets in the database and updates it real-time 实时Java互操作性 - Real-time Java interoperability 实时过滤输入? - Filter Input in Real-Time? pubnub实时通讯 - Pubnub real-time communication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM