[IronPython] Question (Novice) on using Microsoft Excel viaIronPython

J. de Hooge info at geatec.com
Wed Feb 8 08:00:27 PST 2006


Sorry, I forgot where I found this, but maybe it helps.

 
# this example starts Excel, creates a new workbook, 
# puts some text in the first and second cell
# closes the workbook without saving the changes
# and closes Excel.  This happens really fast, so
# you may want to comment out some lines and add them
# back in one at a time ... or do the commands interactively
 
from win32com.client import Dispatch
 
xlApp = Dispatch("Excel.Application")
xlApp.Visible = 1
xlApp.Workbooks.Add()
xlApp.ActiveSheet.Cells(1,1).Value = 'Python Rules!'
xlApp.ActiveWorkbook.ActiveSheet.Cells(1,2).Value = 'Python Rules 2!'
xlApp.ActiveWorkbook.Close(SaveChanges=0)
xlApp.Quit()
del xlApp
 
# raw_input("press Enter ...")

 

Kind regards

Jacques de Hooge

info at geatec.com

 

 

-----Oorspronkelijk bericht-----
Van: users-bounces at lists.ironpython.com
[mailto:users-bounces at lists.ironpython.com] Namens Weffers, H.T.G.
Verzonden: Wednesday, February 08, 2006 1:10 PM
Aan: users at lists.ironpython.com
Onderwerp: [IronPython] Question (Novice) on using Microsoft Excel
viaIronPython

 

If the following is a too frequently asked question, then please 

forgive me. 

 

Being a novice in the use of IronPython and Python I spent a 

significant amount of time trying to find the answer to the below 

question in a FAQ list, but until now I did not (yet) find a (pointer

to a) useful answer.

 

Using IronPython (on a Microsoft Windows XP platform) I want to 

develop an application that takes data from a specific range of 

cells in a Microsoft Excel Workbook (file), processes the relevant

data, and then creates a graph representation using GraphViz.

 

What I am currently most looking for is a way of accessing the

specific data in the Microsoft Excel file, preferably using the

most recent beta of Microsoft IronPython effectively 'exploiting'

its .Net capabilities. 

 

Concrete suggestions for or pointers to (similar) solutions are

appreciated.

 

Sincerely yours,

 

Harold Weffers

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/users-ironpython.com/attachments/20060208/80247752/attachment.htm


More information about the users mailing list