Pallavi Apotikar wrote:
> 
> Actually, I have an excel sheet, where I am entering the data.
> 
> I am reading the entered data in python.
> 
> excel takes data as a string.
> 
> before passing it to python, i wanted to check whether the entered 
> data(value) is a valid python data type.
> 
> so instead of checking this in python script(/ say program), I wanted to 
> put macro in excel , so that all the values are checked at a stretch (or 
> say while entering - before passing it to the python program.)
> 
> So is it possible ?
> 
> Pallavi Ajabrao Apotikar
> Tata Consultancy Services
> Mailto: [EMAIL PROTECTED]
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty.        IT Services
>                        Business Solutions
>                        Outsourcing
> ____________________________________________
> 
> 
> *"Graeme Glass" <[EMAIL PROTECTED]>*
> 
> 01/31/2008 03:31 PM
> 
>       
> To
>       "Pallavi Apotikar" <[EMAIL PROTECTED]>
> cc
>       python-win32@python.org
> Subject
>       Re: [python-win32] Reading .py or .pyc from an excel sheet
> 
> 
>       
> 
> 
> 
> 
> 
> 
> On Jan 31, 2008 11:43 AM, Pallavi Apotikar <[EMAIL PROTECTED] 
> <mailto:[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
> ForwardSourceID:NT00006176    
> 
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> python-win32 mailing list
> python-win32@python.org
> http://mail.python.org/mailman/listinfo/python-win32

Is sound line you should write the entire data entry program in wxWindows using 
the wxGrid (which looks like Excel to the end user).  Then you can control the 
data that goes into each cell with your Python program.

-Larry

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

Reply via email to