Skip to main content
Filter by
Sorted by
Tagged with
4 votes
0 answers
142 views

I’m using xlwings to read an Excel sheet into a pandas DataFrame with the built-in pd.DataFrame converter. Some of my columns contain mixed data (e.g. IDs or codes like 123, 00123, ABCD). When I read ...
Dynamicgra d's user avatar
0 votes
0 answers
100 views

I use xlwings server, installed it as described here: , it runs on one of the VMs of my server. On another VM (Win Server 2025) I installed python, xlwings, xlwing addin and other dependencies. In the ...
Sergey Bakaev Rettley's user avatar
0 votes
0 answers
94 views

I have a main Excel workbook containing array formulas, which reference data from several sub-workbooks (or sheets). The workflow is as follows: The main workbook initially does not contain the sub-...
devraux's user avatar
1 vote
1 answer
90 views

I am in the process of porting over some python excel automation scripts to work on MacOS (previously they were run on windows, and used the pywin32 library to "refresh" an excel file - the ...
NicLovin's user avatar
  • 375
0 votes
2 answers
97 views

I'm currently working on a project where I need to open an .xlsm Excel file through my code. However, I keep running into the following error: öffnen Traceback (most recent call last): File "C:\...
XlordXtgX's user avatar
0 votes
1 answer
57 views

I try to copy the picture cells in column B using xlwings with the following code-snippet to first read all the images: import os import sys import xlwings as xw path = os.path.abspath(os.path....
Rapid1898's user avatar
  • 1,565
1 vote
2 answers
146 views

I am using xlwings Lite addin with Excel 2021. Is there any way to get the path of Excel file from xlwings Lite? I tried to use os.getcwd() function, but it returns python working directory. Thanks,
Abdul Gaffoor G K's user avatar
0 votes
1 answer
63 views

I am trying to access an excel which is stored in sharepoint. I am opening that particular file runs_excel after closing all excel instances from Task Manager. This used to work since the last six ...
PythonNoobard's user avatar
0 votes
2 answers
234 views

I'm facing an issue while pushing data into Excel using Python. I need to write a string like "4/10" to a cell, but Excel automatically converts it into a date. However, "4/10" is ...
II-SARIP-II's user avatar
1 vote
1 answer
259 views

Overview I have a python script opens an excel workbook, makes some changes, then saves it. This is just one step in a series of excel processing operations, most of which are written in R. My end ...
dolphingang's user avatar
0 votes
1 answer
93 views

I have an Excel workbook that uses an xlwings RunPythonScript() call to an external python script. As I want to run this python script outside of my vdev I've installed pipx and through pipx installed ...
webby's user avatar
  • 11
0 votes
0 answers
64 views

Trying to install xlwings on a mac. MacOS Sonoma, version 14.7.1. Python 3.12. Installed through Anaconda. I get the error message XlwingsError: Make sure to have "appscript" and "...
Willem's user avatar
  • 61
0 votes
0 answers
75 views

I'm currently automating a process using python and xlwings and need to clear any AutoFilters in a target excel worksheet. I've seen numerous samples that refer to using if wb.sheets[sheetname].api....
webby's user avatar
  • 11
0 votes
0 answers
74 views

I am trying to automate a process where we need to import data from MySQL Database in to a ListObject (Ms.Excel Table). Environment: Ms.Office Professional 2021 Windows 10 pro Python 3.12.1 The code ...
Ahmed's user avatar
  • 295
0 votes
0 answers
19 views

Im am trying to set the "FILTER" function in Excel with Xlwings. Below is my Code: wb = xw.Book('table.xlsx') wb.app.visible = False sheet = wb.sheets['Sheet1'] formula="""=...
MoeBot's user avatar
  • 1
0 votes
0 answers
145 views

I'm trying to run a simple python script from VBA using xlwings, but I am getting an error "Run time error '5': Invalid procedure call or argument". I suspect that this is because it is ...
Matthew Ward's user avatar
2 votes
2 answers
196 views

I'm using xlwings with python to copy one excel sheet to another. As part of the copying, however, I'd like to collapse all the grouped columns. This is different than hiding the relevant columns and ...
YGA's user avatar
  • 10.1k
-1 votes
1 answer
144 views

I installed xlwings with pip3. It says: % pip3 install xlwings Requirement already satisfied: xlwings in /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages (0.33.4) ...
VanDee's user avatar
  • 27
0 votes
0 answers
85 views

I am trying to set FreezePanes on the first column in my Sheet using xlwings. As suggested by @Felix Zumstein in the thread below: How to freeze pane in XLWings app: xw.App = xw.App(visible=True) wb: ...
Dynamicgra d's user avatar
0 votes
1 answer
116 views

I have an entry widget in my GUI to be dynamically filled with the cell range based on the cells have selected in the spreadsheet. For example, if I selected A1:F30 in a sheet, it will put the range ...
Skma84's user avatar
  • 1
0 votes
0 answers
54 views

The code aims to open an Excel spreadsheet, add VBA code (to create some buttons) and close the spreadsheet. import subprocess # This function is called at the end of another python file (everything ...
ItalloEduardo's user avatar
1 vote
0 answers
69 views

I'm trying to setup a command using Xlwings within a Python script to set a specific cell within an Excel worksheet to an Excel Data type (e.g., Stocks, Currencies). I've found the VBA code that sets ...
twe's user avatar
  • 11
0 votes
1 answer
90 views

Is possible to change the color of a column under mathematical conditions in Excel-Xlwings, by code (not FC in excel). I mean, with the table: Name vote Rossi 5 Bianchi 7 Verdi 8 Neri 4 I would like ...
little lion's user avatar
1 vote
1 answer
48 views

I am trying this code because it can read the data with an open excel workbook. import xlwings as xw xlsfile = r'C:\Users\matth\OneDrive\Dokumente\20241023-1904097928-umsatz.xlsx' workbook = xw.Book(...
Matthias Pospiech's user avatar
0 votes
1 answer
281 views

I am trying to automatize the creation of pivot table using xlwings. Here is a random piece of code I created which is supposed to create a pivot table, but I am getting an error at the line where ...
MAX CANNIZZO's user avatar
0 votes
2 answers
194 views

I have a very odd problem. I have a python script that adds data every week to an existing Excel spreadsheet to track a weekly metric I'm interested in. When it pastes the new data in the existing ...
Jim Rutter's user avatar
0 votes
0 answers
43 views

I'm having difficulty in pasting a value to the "next row". Essentially, a line in the code clicks a location in an application, copying a value to the clipboard. I then want to paste that ...
Rodger's user avatar
  • 21
0 votes
1 answer
283 views

I have several already made excels that I'd like to format. One of these formatting is to set a part of a cell in green, and the other part in red. For the sake of this example, let's imagine cell &...
PLG's user avatar
  • 130
2 votes
2 answers
198 views

the problem is as the title states. I have a column AX filled with values. The name of the column is "Remarks" and it will contain remarks but some of those remarks are dates and some are ...
AlphabetsAlphabets's user avatar
0 votes
1 answer
84 views

I have a python script that refreshes data connections, updates slicers and filters. I'm using pywin32 to update my excel file. As I understand, updating excel slicers and filters requires COM ...
intransigent_rocker's user avatar
0 votes
1 answer
114 views

does xlwings support replace_format? I have a large array 200 rows and 250 columns and if I try to color each cell that has a value of “car” to red, it will take so much time to loop through each cell ...
MM84's user avatar
  • 1
0 votes
1 answer
137 views

Using xlwings I'm trying to set an Autofilter on column E of a spreadsheet looking for text "DJM". My code just hangs at the AutoFilter line and does not do anything. The code snippet is ...
user23737879's user avatar
1 vote
1 answer
260 views

I'm trying to use Microsoft Visual Studio to run python code that uses the xlwings library to open a macro-enabled Excel workbook and run a VBA subroutine called MySub() that lives in Module1. When I ...
Benny88's user avatar
  • 25
0 votes
0 answers
77 views

looking for some guidance. I'm trying to add validation to a range of cells in a .xlsm file. I want to dynamically add validation to some cells in column C, dependent on whether a value is present ...
user26863337's user avatar
0 votes
1 answer
266 views

I'm not able to open or call the current active workbook using xlwings. I'm on macOS Sonoma 14.5 and xlwings v0.31.10. I keep getting this error (I'm running the .py file out of 4. Master): ...
cocos2dbeginner's user avatar
0 votes
2 answers
133 views

so I am writing a script that grabs data from an excel sheet, processes it a bit, and then appends it to a different table on a different excel file. the target table has some pure data columns, and ...
Osinaga's user avatar
  • 71
0 votes
1 answer
139 views

Using xlwings, I am connecting to Snowflake and extracting a Pandas dataframe. The dataframe is a mixture of text, dates, and floats, which I have verified by using df.to_excel. However, when I use ...
Toby-wan's user avatar
0 votes
1 answer
117 views

I usually don't ask questions and try to figure things out myself so apologies if the formatting or phrasing is poor. I have a Python script which I want to call through a macro in excel using xlwings....
Bulky's user avatar
  • 43
0 votes
1 answer
74 views

I have a use case where I want to automate and interface an Excel model from The workflow would be something like: Transfer data from Python to Excel Execute macro to run model model to convergence ...
JacquesStrydom's user avatar
0 votes
1 answer
55 views

I'd like to test an Excel file using xlwings and pytest. While writing tests, it would be helpful to have an option to keep the xlwings.App instance open with the test file, so that I can inspect what'...
squarespiral's user avatar
0 votes
0 answers
87 views

I am trying to copy a named range in Excel (ex. "Question_1") and paste it into an empty area of the same worksheet, using Python (xlwings). I am getting an attribute error which mentions &...
Mark Barry's user avatar
0 votes
1 answer
132 views

When using xlwings, I want to, for example, write the string "4 / 5" into excel. However, if I write. sheet[0,0].value = "4 / 5" I get: string converted to date I do not want to ...
Gustav K's user avatar
1 vote
1 answer
180 views

I am trying to figure out how to pass several selected cells from excel into python via xlwings on macOS. I found code that passes cell notation but not all of the values. For example: In my ...
user26262113's user avatar
0 votes
1 answer
167 views

I'm a beginner at Python. This code is for scanning Excel cells by range using xlwings however the process is very slow. I strictly need to use xlwings since it can retain my images and shapes unlike ...
Vinz's user avatar
  • 1
3 votes
1 answer
100 views

Here is my logic that I am trying to understand. import xlwings as xw import threading workbook = "" def function1(): t1 = threading.Thread(target=function2) t1.start() t1.join()...
Rakesh RAMANJULU's user avatar
0 votes
1 answer
86 views

I'm trying to just automate creating a pdf from an excel file to email it out everyday. It should be simple, but it isn't. If I run these files in command line, they will run, create the pdf, and ...
arsarc's user avatar
  • 453
0 votes
1 answer
71 views

i am having issues with matplotlib animations when using xlwings, example from matplotlib: import matplotlib.pyplot as plt import numpy as np import matplotlib.animation as animation import xlwings ...
ewm's user avatar
  • 13
1 vote
0 answers
77 views

I'm opening an Excel file for data entry using Python Pandas & Xlswings. Everything works fine as long as the Excel file is in an editable state (i.e. not opened by another user). Firstly, has ...
Lee Murray's user avatar
1 vote
0 answers
67 views

import xlwings as xw wb = xw.Book() sheet = wb.sheets.add('trade_summary') Produces the following error message: CommandError: Command failed: OSERROR: -1728 MESSAGE: The object ...
AndyB's user avatar
  • 39
0 votes
0 answers
45 views

i have the folowing excel-sheet and try to read the font-color of the cell B3: using the following code: import openpyxl as ox wb = ox.load_workbook("test.xlsx") ws = wb.worksheets[0] ...
Rapid1898's user avatar
  • 1,565

1
2 3 4 5
23