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
[EMAIL PROTECTED]
-----Oorspronkelijk
bericht-----
Van:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Weffers, H.T.G.
Verzonden: Wednesday, February 08,
2006 1:10 PM
Aan: [email protected]
Onderwerp: [IronPython] Question
(Novice) on using Microsoft Excel viaIronPython
If the following is a too frequently
asked question, then please
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
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'
Concrete suggestions for or pointers
to (similar) solutions are
Harold Weffers