Questions tagged [xlwings]
Xlwings is a module to allow Excel to be automated with Python instead of VBA.
xlwings
1,117
questions
0
votes
0
answers
24
views
I am trying to copy/paste a named Excel range to another range in the same worksheet using Python xlwings
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 &...
0
votes
0
answers
35
views
How to embed a fully interactive Plotly figure in Excel on MacOS
I am trying to embed a browser object in my excel worksheet so I can display interactive charts using plotly. I found this post Plotly: How to embed a fully interactive Plotly figure in Excel? which ...
0
votes
1
answer
34
views
How do I disable any kind of automatic conversion into excel when using xlwings?
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 ...
1
vote
1
answer
59
views
Return multiple selected cells from excel into python via xlwings
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 ...
0
votes
1
answer
43
views
Python xlwings slow Execution when scanning Excel Sheet
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 ...
2
votes
1
answer
35
views
xlwings not updating global variable correctly when using threading
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()...
0
votes
0
answers
33
views
Excel hangs in Python script to export excel as a pdf in Task Scheduler, but works normally
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 ...
0
votes
1
answer
33
views
matplotlib animation not working with xlwings
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 ...
0
votes
0
answers
27
views
update xlwings with custom addin
how Do I update a custom excel addin made from xlwings?
I updated xlwings package version from 0.24.x to 0.29.x, but now my custom addin (xlam file) still references the old xlwings versions.
How to ...
1
vote
0
answers
31
views
Python XLSWINGS - Cannot access read-only document
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 ...
1
vote
0
answers
32
views
Error using xlwings to create a worksheet in a new workbook
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 ...
0
votes
0
answers
45
views
How to read the font color of an excel-cell? [duplicate]
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]
...
0
votes
1
answer
62
views
Activate multiple sheets in an Excel file with OpenPyxl
I would like to set several worksheets active in an Excel file, or change the default print settings to "Print entire workbook".
This can be done manually in Excel. But I would like to write ...
0
votes
0
answers
71
views
xlwings RPC Server unavailable strikes again?
I'm seeing an odd behavior with Xlwings. Getting the (-2147023174, 'The RPC server is unavailable.', None, None).
System is a (desktop) Windows 11, Python 3.12.2, Pandas 2.2.1, Xlwings 0.31.1
The ...
0
votes
0
answers
54
views
Checking Excel Formula behind xlwings sql function
I have some complicated processing to do on an Excel Table, for which I am using xlwings to basically run SQL over that table using the sql() function:
Example: SELECT COUNT(*) FROM a
Is it possible ...