Questions tagged [xlwings]

Xlwings is a module to allow Excel to be automated with Python instead of VBA.

Xlwings. Replace your VBA code with Python, a powerful yet easy-to-use programming language that is highly suited for numerical analysis. Supports Windows and Mac

1071 questions
4
votes
1 answer

Move worksheet within a workbook to the end

With xlwings, I am trying to move a worksheet within a workbook to the end. For example, a workbook contains a collection of the following sheets: Sheet1, Sheet2, Sheet3 How can I move Sheet1 after Sheet3 in order to get the following order?…
mouwsy
  • 1,457
  • 12
  • 20
4
votes
1 answer

Retrieve first empty column and row using xlwings

I am looking for a way to find the first empty column and the row. As a part of my use case, I am trying to find out H3 (to add current date) and then H4 and H5 (to add my daily metrics) [screenshot attached]. I have tried below with xlwings. import…
Anku g
  • 101
  • 8
4
votes
1 answer

Creating and naming a table in xlwings

I am trying to use xlwings to interface Excel from some of my Python code and unfortunately only found stackoverflow threads or documentation on accessing/reformatting already existing Excel tables rather than creating new ones from scratch. edit:…
sim
  • 1,227
  • 14
  • 20
4
votes
2 answers

Could not install 'xlwings' in my Ubuntu machine

I am trying to install xlwings module in my Ubuntu machine but failed as below pip3 install xlwings Collecting xlwings Using cached…
Bogaso
  • 2,838
  • 3
  • 24
  • 54
4
votes
3 answers

How to clear filters in Excel using xlwings?

My team are xlwings in Sypder (Python) to convert Excel tables into CSV format. When a table is filtered however, this alters the CSV output. Is there an xlwings command which can clear the filter from the active Excel sheet? A similar command in…
4
votes
0 answers

xlwings api is missing on fresh install

I'm trying to access some of the xlwings api features like sht.api.Copy() and rng.api.Validation.add() raises Traceback (most recent call last): File "/Applications/PyCharm CE 2018.2…
Joylove
  • 414
  • 1
  • 5
  • 20
4
votes
2 answers

xlwings.book hangs if file is already open

How to close a file if it is already open? import xlwings as xw wb = xw.Book(folderpath + 'Metrics - auto.xlsx') Using try:except: but need a way to close the file so it can be opened, or find the file and work with it? I get this error if it's…
REdim.Learning
  • 655
  • 2
  • 14
  • 32
4
votes
1 answer

xlwings: Selecting non-adjacent columns

How would one go about selecting non-adjacent columns using xlwings in python? I'm not sure if this thought is either too simple, or out of scope of what xlwings natively provides, but it seems like it would be a straightforward task and normal…
4
votes
2 answers

Unable to install XLWings add-in into Excel?

I want to try this add-in for Excel. To use the add-in there must be an XLAM file. However, there is no link to one on the website (xlwings.org). Even using pip to 'download/install' xlwings, it doesn't include the command client that the…
user18139
  • 188
  • 1
  • 3
  • 13
4
votes
4 answers

Distribute xlwings macro without xlwings installation?

I'm having trouble finding an answer to this - I'm writing some simple VBA with the goal that my colleagues can install it as an add in or custom tab. Coming from Python I would, of course, prefer to work with xlwings or pyxll, but as I understood…
dv3
  • 4,369
  • 5
  • 28
  • 50
4
votes
3 answers

Read Excel Table headers with xlwings

How can I use xlwings to read a "table" in excel, into a pandas DataFrame, where the table "headers" become the DataFrame column names? Every way I have tried to read the table, the header row is always excluded from the read! Here is what I've…
CrashLandon
  • 161
  • 2
  • 11
4
votes
4 answers

xlwings: Delete a col | row from Excel

How do I delete a row in Excel? wb = xw.Book('Shipment.xlsx') wb.sheets['Page1_1'].range('1:1').clear() .clear() works to remove the content. I want to delete the row. I'm surprise the .clear() function works, but not .delete() Any advice helps!…
NinjaWarrior
  • 25
  • 1
  • 2
  • 9
4
votes
1 answer

XLwings, copying values from one workbook to another workbook?

I need to iterate through a bunch of excel workbooks and grab a value from each one and paste that value to a new workbook, so basically consolidating results from a bunch of excel workbooks to a single workbook . The way my script runs now it…
Ian Schelly
  • 43
  • 1
  • 4
4
votes
0 answers

xlwings - import error

Python 3.5 On Mac OS 10.12.2 When importing xlwings module i get a: traceback (most recent call last): File "", line 1, in import xlwings File…
Cy Bu
  • 1,401
  • 2
  • 22
  • 33
4
votes
1 answer

Finding Range of active/selected cell in Excel using Python and xlwings

I am trying to write a simple function in Python (with xlwings) that reads a current 'active' cell value in Excel and then writes that cell value to the cell in the next column along from the active cell. If I specify the cell using an absolute…
QBG
  • 55
  • 1
  • 3
1 2
3
71 72