xlwings

Zombie process running xlwings

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get a python error when attempting to use xlwings. Just importing xlwings seems to be sufficient to trigger the problem. Lewis-MacBook-Air:~ lewis$ python Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, Oct 19 2015, 18:31:17) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://anaconda.org >>> import xlwings >>> xlwings.__version__ '0.6.0' >>> exit() Error in atexit.

利用 Python 插件 xlwings 读写 Excel

匿名 (未验证) 提交于 2019-12-02 22:11:45
程序比较简单,直接上程序。 # -*- coding: utf-8 -*- import xlwings as xw import pandas as pd from datetime import datetime # 统计时间, 只有时间要改 START_TIME = '2018-07-01 00:00:00' END_TIME = '2018-07-31 23:59:00' START_ROW = 2 # 处理Excel文件开始行 END_ROW = 200 # 处理Excel结束行 # 天数 * 每天工作时间 * 分钟 WORK_TIME = 30 * 22 * 60 # 关键设备清单 key_machine = ['609', '610', '621', '622', '623', '624', '627', '628', '636', '638', '667', '670', '675', '689'] persons = ['张三', '李四', '王五'] app = xw.App(visible=True, add_book=False) wb_source = app.books.open('downTimeData.xls') # 打开Excel文件 downTimeData.xls sheet = wb_source.sheets[0] # 选择第0个表单

Open a Workbook with XLWINGS without making it visible

别说谁变了你拦得住时间么 提交于 2019-12-02 22:00:46
I am starting to use XLWings (not that I like Excel, at all, but it is something I HAVE TO do). The thing is that I cannot find the way to make Python open a Workbook without showing it. It seems the constructor for Workbooks in the old XLWings 0.6.4 was xlwings.Workbook, and one of the arguments was a flag 'app_visible' (see http://docs.xlwings.org/en/v0.6.4/api.html ). However, in the new v0.9.2 Workbook has been replaced by Book, and Book does not have any such flag ( http://docs.xlwings.org/en/stable/api.html ). The App object does have it, and I thought that was the way to go. So I coded:

xlwings with python 3.5 on Windows

一曲冷凌霜 提交于 2019-12-02 13:11:46
问题 I have been stuck for some time. My configuration is: python 3.5 , xlwings 0.5.0 and Windows 7 . I get the following traceback while trying to import xlwings : Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\Python 3.5\lib\site-packages\xlwings\__init__.py", line 20, in <module> from . import _xlwindows as xlplatform File "C:\Program Files\Python 3.5\lib\site-packages\xlwings\_xlwindows.py", line 15, in <module> import pywintypes File "C:\Program

xlwings with python 3.5 on Windows

帅比萌擦擦* 提交于 2019-12-02 05:25:57
I have been stuck for some time. My configuration is: python 3.5 , xlwings 0.5.0 and Windows 7 . I get the following traceback while trying to import xlwings : Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Program Files\Python 3.5\lib\site-packages\xlwings\__init__.py", line 20, in <module> from . import _xlwindows as xlplatform File "C:\Program Files\Python 3.5\lib\site-packages\xlwings\_xlwindows.py", line 15, in <module> import pywintypes File "C:\Program Files\Python 3.5\lib\site-packages\win32\lib\pywintypes.py", line 124, in <module> __import_pywin32

使用Python更快速地处理Excel

北慕城南 提交于 2019-12-02 05:24:55
Excel在当今商业中的使用非常普遍。在Dataquest,出于很多原因,我们通常推荐使用代码处理数据,并且我们的许多数据科学课程的目标是教授数据分析和数据科学的高效编码。但是,无论您多么喜欢使用Python,在一天结束时,有时您还是需要使用Excel来展示您的发现或共享您的数据。 但这并不意味着我们就不能继续享受Python的一些效率了!实际上,使用一个名为xlwings的库,您可以使用Python使Excel运行得更快。 在这个xlwings教程中,我们将介绍如何在Excel中使用Python来执行和使用一些常见的操作,比如根据特定的条件删除行、使用Excel函数和公式、自动填充、创建表单、图表等。为了跟随这篇文章,你应该熟悉基本的Python概念(对象、方法、属性、函数)和Python的语法,并对Excel和VBA有一定的了解。 很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手。 很多已经做案例的人,却不知道如何去学习更加高深的知识。 那么针对这三类人,我给大家提供一个好的学习平台,免费领取视频教程,电子书籍,以及课程的源代码! QQ群:127341871 我们将使用一个数据集,其中包含有关欧洲彩票抽奖的信息,称为EuroMillions。这个数据集是从这个链接下载的,它包含了截止到9月20日的所有EuroMillions彩票信息。当你阅读这篇文章的时候

How to reference Excel table column names in XLWings?

落花浮王杯 提交于 2019-12-02 02:56:39
Does XLWings allow my to interact with Excel tables (available in Excel 2007 and later via menu or ctrl+t) by table and column names? This does exist in the young, open sourceproject, Pyvot ( https://pypi.python.org/pypi/Pyvot ). I am hopeful that it is possible in XLWings now or that XLWings will add the functionality, Especially since this open source project is available as a model. Here is an example from https://pythonhosted.org/Pyvot/tutorial.html . "Pyvot specifically recognizes column names from tables and auto-filters. Pyvot will search all tables in the workbook for a given column

importing xlwings module into python 3.4

匆匆过客 提交于 2019-12-01 19:53:46
I'm trying to use the new excel integration module xlwings It works like a charm under Anaconda 2.0 for python 2.7 but I'm getting this error under Anaconda 2.0 for python 3.4 the xlwings file does contain class Workbook so I don't understand why it can't import it when I simply use the xlwings file in my project for 3.4 it works just fine File "C:\Users\xxxxx\AppData\Local\Continuum\Anaconda3\lib\site-packages\xlwings__init__.py", line 1, in from xlwings import Workbook, Range, Chart, version ImportError: cannot import name 'Workbook' In "C:\Users\xxxxx\AppData\Local\Continuum\Anaconda3\lib

pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352565), None)

喜你入骨 提交于 2019-12-01 18:03:59
I was created example from http://docs.xlwings.org/en/stable/vba.html / Python 3.5.1 |Anaconda 2.5.0 (32-bit)| (default, Jan 29 2016, 15:46:01) / and got error -- --------------------------- Error --------------------------- Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Python3\mymodule.py", line 7, in rand_numbers n = int(Range('Sheet1', 'B1').value) # Write desired dimensions into Cell B1 File "C:\Python3\lib\site-packages\xlwings\main.py", line 701, in __init__ self.xl_sheet = xlplatform.get_worksheet(self.xl_workbook, sheet_name_or_index) File "C:\Python3

pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, None, None, None, 0, -2147352565), None)

主宰稳场 提交于 2019-12-01 16:15:38
问题 I was created example from http://docs.xlwings.org/en/stable/vba.html / Python 3.5.1 |Anaconda 2.5.0 (32-bit)| (default, Jan 29 2016, 15:46:01) / and got error -- --------------------------- Error --------------------------- Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Python3\mymodule.py", line 7, in rand_numbers n = int(Range('Sheet1', 'B1').value) # Write desired dimensions into Cell B1 File "C:\Python3\lib\site-packages\xlwings\main.py", line 701, in _