简体   繁体   中英

How to preserve formula in whole workbook

I'm trying to overwrite an existing Excel file. Then I tried to read in the workbook and use xlscopy to copy the original file and make self.wt_bk could write something in it.

It seems there is no way to copy formula from original excel file to the new one.

Is there any better way can let me rewrite some cells in an existed excel file without using win32com , because I need to run it on Ubuntu system

Thanks

self.rd_bk = xlrd.open_workbook(self.detailed_xls_fname,
                                            formatting_info=True)
self.wt_bk = xlscopy(self.rd_bk)

I think you will find what you need here. These packages work in linux as well as windows.

Working with Excel Files in Python

I know its not a great answer, but google "python excel". I don't get paid to be a research assistant.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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