繁体   English   中英

有没有办法在 python 中将 append 数据写入 excel 文件而不读取其内容?

[英]Is there a way to append data to an excel file without reading its contents, in python?

我有一个巨大的主数据转储 excel 文件。 我必须定期向它发送 append 数据。 要附加的数据存储为 pandas dataframe。 有没有办法把 append 这个数据放到主转储文件中,而不必读取它的内容。

转储文件很大,程序加载文件需要相当长的时间(使用熊猫)。

我已经尝试过 openpyxl 和 XlsxWriter 但它没有用。

不可能只将 append 转换为像文本文件这样的 xlsx 文件。 An xlsx file is a collection of XML files in a Zip container so to append data you would need to unzip the file, read the XML data, add the new data, rewrite the XML file(s) and then rezip them.

这实际上是 OpenPyXL 所做的。

暂无
暂无

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

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