Comments (6)
It runs Python via cmd.exe. You can try to see if "RunPython: Use UDF Server" checked makes a difference. Or you can migrate to xlwings Server that gets rid of local Python and any VBA, but is part of xlwings PRO.
from xlwings.
I don't know of any other way than doing this via cmd.exe: https://github.com/xlwings/xlwings/blob/main/xlwings/addin/Main.bas#L270-L275
from xlwings.
Hello @fzumstein ,
Thanks for the quick response, I tested with RunPython: Use UDF Server
being checked. However ,it did not make any difference. The aforementioned Windows Defender
alert popped up in both cases.
May I ask - What is the technical reason for choosing CMD.EXE
to launch Python.exe
as opposed to launching Python.exe
directly?
Thanks,
Sau
from xlwings.
Hello @fzumstein ,
I am pondering whether it makes sense to try and launch the Python process directly , i.e. without using cmd.exe /c
.
I would like to do a small proof of concept to find the answer to the above question .
Thinking aloud - I could copy over your Main.bas
in my personal Addin project. and make changes to the Wscript.Run
arguments.
What do you think?
from xlwings.
Sure feel free! You're probably running into a problem with the LOG_FILE, which is used for error messages.
from xlwings.
Ok. This is what I have done.
- Created a new XLAM and added the file
xlwings.bas
asmyxlwings
- Added a new VBA function
HelloWorld
in this XLAM - Wired a new ribbon button to the VBA function
HelloWorld
- The function
HelloWorld
invokes theRunPython
frommyxlwings.bas
(renamed asNewRunPython
)
Problem
tab = wb.sheets.active.name
throws an error.
Question
Why can't Python find the Active Sheet ? See line 9 above
from xlwings.
Related Issues (20)
- Unknown xlwings error HOT 1
- enable xlwings Reports with xlwings Server
- xlwings Reader: named ranges are off if going across double-letter cell addresses
- how to call async udf with sheet as parameter?
- xlwings Server: respect the sync/async definition of custom functions
- xlwings Server: allow to configure a separate backend for socket.io
- How to draw shapes?
- Multiple SharePoint resources - only one accessible via xlwings
- RunPython timeout on Excel for Mac HOT 4
- can not save well HOT 1
- Excel isnt working properly after python function is started
- VBA: Export to/Import from a subfolder HOT 2
- nonetype object has no attribute "flush" HOT 1
- Improve sql UDF to work with table names if there are any instead "a", "b", etc.
- xlwings Server: Exception: KeyError: 'en-ch'
- UDF functions cannot return df as table in VBA function HOT 3
- The problem with saving wb.save() HOT 6
- Python error invoking COM method. When import funcstions HOT 2
- Add the ability to check if a value in a column or row is hidden HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xlwings.