I think you are both making a lot of assumptions and over-simplifying.

If the users used a Swing JTable, it would not look much like Excel, not
really. You would certainly not be able to do the intermediate and advanced
features offered by Excel, such as Data Validation, formatting, charting.
And users who are used to entering their data into an Excel spreadsheet will
likely resist having to install a Java application to do the same thing.
Even after the Java application was done, could you mail the data to your
colleagues for review and approval? Could you embed the table into a Word
document for publication?

On the other hand, getting data from a spreadsheet into a database is going
to be non-trivial even with POI. How will you validate the columns? How do
you tell the user which data was invalid? How will you handle blank rows or
rows where the datatype is string and you are expecting a number. How will
you handle the possibility that a user uploads the same spreadsheet more
than once? What will you do if the user sends a non-Excel file - (BTW there
are dozens of bugs in Bugzilla where a *developer* tries to read a non-Excel
file with POI - POI spits out a message that looks like "Invalid header
signature; read 3546922463590896708, expected", and the developers insists
that he is using a real .xls file when in fact the file is .html, or a MIME
attachment, or something else. You do know that Excel can save a workbook as
.html, and the result looks very much like spreadsheet, and in fact you can
read that .html file back into Excel, likely without loosing anything in
formatting).

-----Original Message-----
From: Jim Cobban [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 11, 2004 7:05 PM
To: POI Users List; Madhusudan Mathihalli
Subject: Re: Silly question regarding POI-HSSF

If you want them to enter the data into the database why do you not simply
provide them with an Excel-like interface to the database?  It is quite
trivial to present the contents of a JDBC query reply in a Swing JTable, and
then as the user modifies the values in the cells of the JTable, write those
changes back into the database.  I haven't done this in SWT but it is
probably easier do do there, most things are.

Alternatively, using POI-HSSF, it is fairly straightforward to read an Excel
spreadsheet and write the contents into an SQL database.  I have also done
this, but it is more work than the direct GUI.  The big advantage of this
approach is not having to deploy your Java app on all of the users
workstations.

----- Original Message -----
From: "Madhusudan Mathihalli" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, September 11, 2004 1:50 PM
Subject: Silly question regarding POI-HSSF


> Hi,
>   I just started reading about the POI-HSSF, and I've to admit that
> it's really a cool project.
>
> I had a pretty silly question regarding using POI-HSSF - please bear
> with me and if you've already answered such questions.
>
> Today, some of my collegues are share data via an Excel Spreadsheet.
> I'm trying to change this behaviour to saving the data in a database -
> however, since they're not used to filling data on a HTML page,
> there's been some problems in getting them to use the web interface.
>
> With POI, I think I can give them a Excel-style interface, excel-style
> editing capability and on the backend, parse the xls and save the data
> on the database.
>
> Question:
> - Do you see any problems in this ?
> - Do you already know of a similar implementation (if so, can you
> please give me some pointers)
>
> Thanks
> -Madhu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to