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

Stanislas Pinte stan at ertmssolutions.com
Wed Feb 8 13:46:53 CET 2006


Selon "Weffers, H.T.G." <h.t.g.weffers at tue.nl>:

> 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.
>  

check the csharp sample here:

http://www.thecodeproject.com/csharp/csharp_excel.asp

it should be fairly straightforward to translate that to python directly, like

import CLR.Excel

workbookPath = "c:/SomeWorkBook.xls"
excelWorkbook = excelApp.Workbooks.Open(workbookPath,
        0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",
        true, false, 0, true, false, false);

> 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
> 
> 
>  
> 


-- 
-----------------------------------------------------------------
   Stanislas Pinte             e-mail: stan at ertmssolutions.com
   ERTMS Solutions               http://www.ertmssolutions.com
   Rue de l'Autonomie, 1             Tel:    + 322 - 522.06.63
   1070        Bruxelles              Fax:   + 322 - 522.09.30
----------------------------------------------------------------- 






More information about the Ironpython-users mailing list