RE: [Jython-users] jython and excel
by Updike, Clark other posts by this author
May 5 2003 4:57PM messages near this date
Re: [Jython-users] jython and excel
|
[Jython-users] Hello, odd problem here.
If you don't need to interact with the excel in real-time,
just write out your data in csv format with a .csv extension.
Excel will open the file directly. If you can launch excel
from a command prompt, you could use os.system to run it
supplying the file to open as an arg (but finding an
excel executable may be harder than you think). This
sample writes out file that can be opened directly by
excel:
> >> f=open('/temp/test.csv','w')
> >> tab=[['a','1'],['b','2']]
> >> f.write("\n".join([','.join(row) for row in tab]))
> >> f.close()
If you need to control excel from jython, look at:
http://www.javaworld.com/javaworld/javaqa/2002-05/01-qa-0503-excel3.html
-Clark
-----Original Message-----
From: Cherney John-CJC030 [mailto:John.Cherney@[...].com]
Sent: Monday, May 05, 2003 12:26 PM
To: jython-users@[...].net
Subject: [Jython-users] jython and excel
Is there a way to get at information in an Excel spreadsheet directly rather
than saving the Excel file as a text file (XML, HTML, csv) and parsing it?
Is there a way at the document model along the same lines as what you can do
with VBA?
Thanks,
jwc
---
John Cherney | Motorola Inc
Software Engineer | phone:(248)994-7713
Network Transport | fax:(248)324-9550
CGISS | pager:(888)878-1354
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jython-users mailing list
Jython-users@[...].net
https://lists.sourceforge.net/lists/listinfo/jython-users
|