Python Forum
Python Package for deploying python code in Excel on machines without python
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Package for deploying python code in Excel on machines without python
#1
All, 
    Which free python package can be used to deploy Python code into Excel ? I am using Anaconda and based on my research here is what I have so far : 

https://docs.continuum.io/anaconda/excel 
1. Data Nitro - Not Free beyond trials 
2. ExcelPython -  Development is currently discontinued and rolled into xlwings
3. XLLoop :  Not entirely clear on this one 
4. ExPy : Demonstration software 
5. PyXLL : Limited to educational or personal 
6. xlwings : Requires Python to be installed on the user machine 

    Essentially , I want to be able to deploy my python code into Excel like a macro such that a user only needs to have the workbook but does not necessarily need Python installed on his machine to be able to utilize the functionality of the code. 


    Any inputs or guidance is appreciated 

Best 
U
Reply
#2
Pandas is good pd.read_excel(), df.to_excel() more heavy share without python installed.

XlsxWriter test with Python 3.6 freeze to standalone.
I activate a virtual enviroment,and install xlsxwriter and cx_freeze from Gohlke.
(web_scrape) C:\Python36\web_scrape
λ pip install XlsxWriter-0.9.5-py2.py3-none-any.whl
Processing c:\python36\web_scrape\xlsxwriter-0.9.5-py2.py3-none-any.whl
Installing collected packages: XlsxWriter
Successfully installed XlsxWriter-0.9.5

(web_scrape) C:\Python36\web_scrape
λ pip install cx_Freeze-5.0.1-cp36-cp36m-win32.whl
Processing c:\python36\web_scrape\cx_freeze-5.0.1-cp36-cp36m-win32.whl
Installing collected packages: cx-Freeze
Successfully installed cx-Freeze-5.0.1
So with this i have a stand alone solution with a exe file,
that write a hello world to a hello.xlsx file.
#make_exe.py
from cx_Freeze import setup,Executable
import sys

# Replaces commandline arg 'build'
#sys.argv.append("build")

# If need to include/exclude module/packages
includes = []
excludes = []
packages = []

# Console or Win32GUI
base = None
if sys.platform == "win32":
    base = 'Console'
    #base = 'Win32GUI'

# Name of file to make ".exe" of
filename = "excel_test.py"
setup(
    name = 'Myapp',
    version = '0.1',
    description = 'Cx test',
    options = {'build_exe': {'excludes':excludes,'packages':packages,'includes':includes}},
    executables = [Executable(filename, base=base, icon = None)])

# From command line
#python make_exe.py build
# excel_test.py
import xlsxwriter

workbook = xlsxwriter.Workbook('hello.xlsx')
worksheet = workbook.add_worksheet()
worksheet.write('A1', 'Hello world')
workbook.close()
Reply
#3
Doesn't this still require a user to have python installed to use the application after development ?

What I was trying to ask was:
I would like to develop a stand-alone application in Excel using Python where the user doesn't have to worry about installing Python on their machine
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python outputs to Excel NewBiee 3 855 Nov-26-2023, 07:25 AM
Last Post: DPaul
  problem of converting Matlab code to python DongyanZ 2 1,408 Feb-03-2023, 01:04 PM
Last Post: jefsummers
  Montecarlo simulation methods - Python package vallops99 0 768 Jan-04-2023, 08:29 AM
Last Post: vallops99
  Reduce four for loops or parallelizing code in Python cee878 1 1,205 Feb-10-2022, 10:02 AM
Last Post: Larz60+
  pivot table (excel vs python) Bric 1 1,664 Feb-02-2022, 11:04 PM
Last Post: Bric
  trouble installing python package Tuxedo 1 3,221 Apr-07-2021, 09:07 AM
Last Post: Larz60+
  Python - Merge existing cells of Excel file created with xlsxwriter manonB 0 3,715 Mar-10-2021, 02:17 PM
Last Post: manonB
  Python vs VBA for Excel jfunkitup 3 3,316 Dec-31-2020, 07:56 AM
Last Post: caleb_cruze
  Deploying to ML Model to web application Scoder 2 2,673 Aug-31-2020, 07:32 AM
Last Post: hussainmujtaba
  Python PDF merging from an excel pandas for loop siraero 0 2,188 Aug-16-2020, 09:34 AM
Last Post: siraero

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020