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
-1
votes
1 answer

Excel formulas in python

I have been searching all day for a solution to this problem, and I can't seem to find any solution.My original goal was to find a way to use excel autofill through a python library but that seemed impossible. So far I have tried xlwings and…
David
  • 129
  • 1
  • 11
-1
votes
1 answer

Convert Excel range into csv or tab-delimited file

I have an Excel 2016 worksheet Sheet1 and would like to convert the range $A$1:$Z$150 into a csv or tab-delimited file. I am using python v3 xlwings to capture the range. my_range = Range('Sheet1','A1:Z150').value How do I convert my_range into a…
user1315789
  • 3,069
  • 6
  • 18
  • 41
-1
votes
1 answer

How works the method __repr__ of xlwings 's class Apps when it uses repr(list(self))

I trying to make a new class and I found a similar class in the module xlwings, but I can't understand how works the method repr when it calls to self ("repr(list(self)). How the class knows return a list with the apss ? The code is: class…
rvcristiand
  • 442
  • 7
  • 19
-1
votes
1 answer

AttributeError: module 'xlwings' has no attribute 'save'

def Cleanse(infile): import xlwings as xw dataset= xw.Book(infile) xw.save() Hi, I'm using the above code. It runs the first 2 lines (plus the function header) fine, but fine it says save does not exist. I have checked my version, it is…
Kelly
  • 7
  • 4
-1
votes
1 answer

SyntaxError: non-keyword xlwings

While trying to run the following code: import xlwings as xw from xlwings.constants import SortOrder from xlwings.constants import SortOrientation def xlwingstest(): wb = xw.Book.caller() wb.app.screen_updating = 'False' …
Rsaha
  • 75
  • 2
  • 4
  • 12
-1
votes
3 answers

Use Python To Show All Combinations

I am attempting to get all possible combinations of any number of series. How would I write a loop to get all the combinations and print them into an excel file? Input Series 1 A,B,C Series 2 1,2,3 Series 3 X,Y,Z Output Combo 1 A,1,x Combo 2…
polonius11
  • 1,703
  • 5
  • 15
  • 23
-1
votes
1 answer

Calculate a closed workbook without opening it

I try to use xlwings and openpyxl to work on workbooks. I am just wondering if it is always mandatory to open a workbook to manipulate it. For example, is it possible to recalculate a closed workbook without opening it? I tried app_visible=False of…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
-1
votes
1 answer

ypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

I have error if trying to do example http://docs.xlwings.org/en/stable/vba.html --------------------------- Error --------------------------- Traceback (most recent call last): File "", line 1, in File…
Evgeniy Rasyuk
  • 287
  • 1
  • 2
  • 12
-2
votes
1 answer

How to fill the empty cell with value above cell using xlwings?

How to fill the empty cell with value above cell using xlwings? Can you let me know the code?
-2
votes
1 answer

Add new sheet with graph

newby question. I would like to add a new sheet to an existing wb that I've created with xlwings. It seems that when I try to add e write the 2nd sheet the 1st one going to be overwritten. Here the code : import pandas as pd import matplotlib.pyplot…
Stefano
  • 1
  • 1
-2
votes
1 answer

How to get the CodeName of a sheet

I'm trying to use xlwings to deal with Excel files similarlly to what I used to do via VBA. As I've learned so far, I can access a spreadsheet using name or index. but both of which can be modified. Is there a way to access a sheet using the…
wkSpeaker
  • 11
  • 3
-2
votes
1 answer

Why did push of a Flask app to Heroku failed?

I'm simply trying to push my Flask app to Heroku but I encountered the following error: remote: ERROR: Command errored out with exit status 1: remote: command: /app/.heroku/python/bin/python -c 'import sys, setuptools,…
-2
votes
1 answer

Can you run a macro from one Excel sheet in another?

I want to run a macro on CSV files that are sent to me using an xlwings script. As such storing the macro in each new file would be a pain. Is there anyway to run the script from another workbook, or even just directly send the code to the CSV file?…
Kelly
  • 7
  • 4
-2
votes
1 answer

pass data frame from one function to another in python

I am using two functions, one to load data and another to get a summary of the same data. However in second function analyze() I get the error df not defined. How do I pass df from loader() to analyze() ? from xlwings import Workbook, Range import…
Abhinav Bajpai
  • 401
  • 1
  • 5
  • 10
-2
votes
1 answer

About xlwings, the API for Excel VBA to use Python

When I follow the instruction of xlwings up to: Sub MyMacro() RunPython ("import mymodule; mymodule.rand_numbers()") End Sub It gives me error like: can't find mymodule. My understanding is this should be an object from xlwings. Why…
Paul Liu
  • 31
  • 1
  • 6
1 2 3
71
72