ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> Jython-users
Jython-users
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved