Article View: borland.public.jbuilder.java.swing
Article #9684Re: Is it possible to exporting data from JTable to Word or Excel?
From: John P. McGrath
Date: Tue, 15 Feb 2000 00:00
Date: Tue, 15 Feb 2000 00:00
20 lines
1253 bytes
1253 bytes
On Tue, 15 Feb 2000 08:37:57 -0500, Vinayak D. Machan wrote: > I am new to JBuilder and it's packages. I would like to know > if it is possible to export the data in a JTable to an Excel > spreadsheet or a Word document. If so , what methods or classes > should I use to implement the export. You will not find any methods defined in JTable to export to an Excel spreadsheet. But it should be pretty easy to write a comma separated values (CSV) file. Just traverse all of the fields, and write the field values to a text file, with commas separating the fields, and newlines separating the rows. You will have to quote strings and such, but it should not be too hard. -- John P. McGrath <JPMcGrath@fast.net> <jpm@nscs.fast.net>
Technical Details
Message-ID:
<MPG.1313f2e6c00615f0989795@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<88bkha$jge8@bornews.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,3d7fda99942a59af X-Google-Attributes: gid111d45,public From: John P. McGrath <JPMcGrath@fast.net> Subject: Re: Is it possible to exporting data from JTable to Word or Excel? Date: 2000/02/15 Message-ID: <MPG.1313f2e6c00615f0989795@forums.borland.com> X-Deja-AN: 586380921 References: <88bkha$jge8@bornews.borland.com> Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.swing