Skip to main content

Home/ Python Programming/ Group items tagged excel

Rss Feed Group items tagged

reckoner reckoner

Re: Python in Excel - 0 views

  • You can use Microsoft Script Control. If you have the win32 extensions of python, you can use python in place of vb in this control -open the VBA script editor - In menus/Tools/References add Microsoft Script Control -Make a new module and declare a new MsScriptControl.ScriptControl Global sc as new MsScriptControl.ScriptControl -Initialize the language attibute with python - Note that you and users of your document must have python and its win32 extensions installed. Activestate python distribustion include it. You can put sc.language="python" in the routine Workbook_Open() Now you can import python modules using ExecuteStatement method of the control in vba and have results from python functions with eval method. One interesting thing is that you can pass an object to the control with AddObject method and have python manipulate it. And so on..
  • Global sc As New MSScriptControl.ScriptControl Public Function os_getcwd() sc.Language = "python" sc.ExecuteStatement ("import os") os_getcwd = sc.Eval("os.getcwd()") End Function With this you can set your Excel formula to =os_getcwd() For me it returns "C:\Documents and Settings\Administrator\My Documents", which I needed to know at the time so I didn't have to screw around with the ever annoying pythonpath. You can put the first two lines of the function in the Workbook_Open hook, but I don't know where that is. I hope to use more Python in Excel soon. Hmm, actually, I suppose you can put those first two lines of the function after the Global declaration as well. I know just about zero VBScript and didn't get a chance to do anything else beyond proof of concept yet. I figured I would write something dynamic which allowed more transparent access to Python, maybe allowing formula like =py("os.getcwd()"), etc.
reckoner reckoner

SourceForge.net: pyExcelerator - 0 views

  • Generating Excel 97+ files with Python 2.4+ (need decorators), importing Excel 95+ files, support for UNICODE in Excel files, using variety of formatting features and printing options, Excel files and OLE2 compound files dumper. No need in Windows/COM
reckoner reckoner

Python Cookbook : Read tabular data from Excel spreadsheets the fast and easy way - 0 views

  • Sometimes you get an Excel spreadsheet (say, from the marketing departement) and you want to read tabular data from it (i.e. a line with column headers and lines of data). There are many ways to do this (including ODBC + mxODBC), but the easiest way I've found is this one : provide a file name and a sheet name, and read the data !
Justin Pierce

Enjoy An Excellent Bookkeeping Service - 1 views

It is a small grocery with just 4 staff that I started 6 months ago. I thought I can smoothly run it on my own. But then I noticed that I always encounter troubles in doing the payroll and other mo...

started by Justin Pierce on 28 Dec 12 no follow-up yet
cecilia marie

Excellent Online PC Help Professionals! - 1 views

If you are having issues with your computer, do not hesitate to ask for online computer help from Online Computer Help Today. They have expert computer tech support specialists who can give compl...

Online Computer Help

started by cecilia marie on 04 Nov 11 no follow-up yet
Felipp Crawly

Amazing Customer Service - 1 views

I would like to thank Onward Process Solutions for greatly helping me with my need for assistance in a Customer service outsourcing project. They provided me with 24/7 phone/ email answering serv...

started by Felipp Crawly on 31 Oct 12 no follow-up yet
reckoner reckoner

pyscripter - Google Code - 0 views

  • PyScripter is a free and open-source Python Integrated Development Environment (IDE) created with the ambition to become competitive in functionality with commercial Windows-based IDEs available for other languages. Being built in a compiled language is rather snappier than some of the other Python IDEs and provides an extensive blend of features that make it a productive Python development environment.
  •  
    excellent windows-based IDE
1 - 20 of 20
Showing 20 items per page