Re: [pyxl] opening an excel file to the screen

78 views
Skip to first unread message

Jon Clements

unread,
May 21, 2013, 10:27:32 AM5/21/13
to python-excel

Maybe look at os.startfile?

On 21 May 2013 15:25, "JC" <johnc...@gmail.com> wrote:
Does anyone know if it is possible to create a workbook and its contents using the xlwt module and then actually open the excel sheet you just created in excel (by open I mean physically open excel and the workbook that the script just created on your computer screen)??

What I am trying to do is write a script that pulls together a bunch of data from a database, put it in an excel file, and then open that file to the screen so the user can see it and then save it to a folder of their chosing. Any ideas? Ideally, I need to have this open originally as an unsaved document..and then the user decides where to save it. Thanks.

--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-excel...@googlegroups.com.
To post to this group, send an email to python...@googlegroups.com.
Visit this group at http://groups.google.com/group/python-excel?hl=en-GB.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

JC

unread,
May 21, 2013, 10:50:07 AM5/21/13
to python...@googlegroups.com
Can I use that to open a file that has been written to but not saved as anything yet? That's where I am stuck.

Chris Withers

unread,
May 21, 2013, 2:20:04 PM5/21/13
to python...@googlegroups.com, JC
No, you cannot. For it to be openable by Excel, it needs to exist on disk.

Look at the the tempfile module:

http://docs.python.org/3/library/tempfile.html#module-tempfile

cheers,

Chris
> --
> You received this message because you are subscribed to the Google
> Groups "python-excel" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to python-excel...@googlegroups.com.
> To post to this group, send an email to python...@googlegroups.com.
> Visit this group at http://groups.google.com/group/python-excel?hl=en-GB.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Reply all
Reply to author
Forward
0 new messages