如何以编程方式编辑Excel工作表? [英] How to programmatically edit Excel sheets?

查看:216
本文介绍了如何以编程方式编辑Excel工作表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用python编辑Excel工作簿.有没有这样做的方法,而无需阅读工作簿,编辑我想要的内容并将其写回?即有没有一种方法可以即时进行,因为我只需要在每张纸上编辑几个值?

I need to edit an Excel workbook using python. Is there a way of doing this without reading in the workbook, editing what I want and the writing it back? i.e. is there a way I can do this on the fly, as I only need to edit a couple of values per sheet?

我看过pyexceleratorxlrdxlwt,但是它们似乎仅支持(据我所知)不支持编辑.我不能像使用Linux一样使用pywin32.

I have looked at pyexcelerator, xlrd, and xlwt, but they only seem to support (as far as I can work out) reading and writing not editing. I cannot use pywin32 as I am using linux.

有没有关于图书馆的建议或特定的做事方式?

Any suggestions of libraries or particular ways of doing things?

推荐答案

xlutils 有副本可能与您息息相关的模块

xlutils has a copy module that may be interseting for you

这篇关于如何以编程方式编辑Excel工作表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆