简体   繁体   English

Python:将变量输出到现有的Excel工作表

[英]Python: output variables onto existing excel sheet

I was wondering how to output using Python variables onto an existing excel sheet. 我想知道如何使用Python变量输出到现有的Excel工作表上。

Given the excel column 鉴于excel专栏

[A] [B] [C] [D] [E] [F] [G] [H] [I] [J]

Note: 注意:

  • List item [A] [B] [C] [D] : are given in one excel file (text.xlsx) 列表项[A] [B] [C] [D]:在一个excel文件中给出(text.xlsx)
  • I have strings on [E] [F] , [H] [I] (manipulations based on [A][B][C][D]) ready as a variable 我在[E] [F],[H] [I]上有字符串(基于[A] [B] [C] [D]的操作)准备作为变量
  • I have an int (%) on [G] [J] (manipulations based on [A][B][C][D]) ready as a variable 我在[G]上有一个int(%)[J](基于[A] [B] [C] [D]的操作)准备作为变量

For excel input, I am using xlrd , but I was wondering how do I output these variables onto the same/existing excel file ? 对于excel输入,我使用xlrd ,但我想知道如何将这些变量输出到相同/现有的excel文件中 Which library do I use? 我使用哪个库?

There are python packages available to work with Excel files that will run on any Python platform and that do not require either Windows or Excel to be used. 有一些python包可用于处理任何Python平台上运行的Excel文件,并且不需要使用Windows或Excel。 They are fast, reliable and open source like openpyxl , xlsxwriter . 它们是快速,可靠和开源的,如openpyxlxlsxwriter

Also this may help to you to update existing excel file. 此外, 可能有助于您更新现有的Excel文件。

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

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