[python-win32] Reading .py or .pyc from an excel sheet (original) (raw)

Pallavi Apotikar pallavi.apotikar at tcs.com
Thu Jan 31 13🔞56 CET 2008


I know how to write the macro using VB, but I don't know how to do the same thing using python -- where is the option available etc. Can you give me any reference? Thanks and Regards.

Pallavi Ajabrao Apotikar Tata Consultancy Services Mailto: pallavi.apotikar at tcs.com Website: http://www.tcs.com


Experience certainty. IT Services Business Solutions Outsourcing


"Graeme Glass" <graemeglass at gmail.com> 01/31/2008 05:27 PM

To "Pallavi Apotikar" <pallavi.apotikar at tcs.com> cc python-win32 at python.org Subject Re: [python-win32] Reading .py or .pyc from an excel sheet

On Jan 31, 2008 12:36 PM, Pallavi Apotikar <pallavi.apotikar at tcs.com> 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 ?

Yes of course this is possible. Like you said, create a MACRO in excel. This has nothing to do with python, it's an excel macro you want.

In the python script you could easily check the data/values and convert them/(make sure they are valid) to whatever 'type' you need them to be, within reason. (You can not create a flying spaghetti monster from a datetime for example)

hth,

Graeme

ForwardSourceID:NT000061A6 =====-----=====-----===== 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

-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-win32/attachments/20080131/dae12432/attachment.htm



More information about the python-win32 mailing list