On Jan 31, 2008 11:43 AM, Pallavi Apotikar <[EMAIL PROTECTED]> wrote:

>
> Hello Sir/Madam,
>
> I would like to know, is it possible to read a python file from an excel
> sheet ?
>
> Thanks and Regards
>
> Pallavi Ajabrao Apotikar
>


I don't fully understand what you are asking,

But...

If you where however asking, if it is possible to display the contents of a
python script in an excel sheet, yes it's possible (it's just text), why you
would want to? a .pyc file would be pretty meaningless to you as it is a
'compiled' python script, and is 'bytecode'.

If you where asking if you could control excel via a python script, which I
think is the most plausible, the answer is a resounding yes!

There are countless examples on this mailing list of such tasks.

Google for 'python +excel', will bring up loads of examples.

(http://www.oreilly.com/catalog/pythonwin32/chapter/ch12.html)

import win32com.client
xl = win32com.client.Dispatch("Excel.Application")
xl.Visible = 1


I hope one of these answers will help with what you where asking.

G
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to