poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <acoli...@apache.org>
Subject Re: Use of HSSF for Excel interface with Database?
Date Sat, 15 Mar 2003 02:30:20 GMT
Excel files are NOT database files.  Even if you COULD query them, it 
would just be a delarative way of
iterating row by row.  The data is stored linearly (so far as this is 
concerned) not in a tree of any kind.  Its like
asking to query a comma delimeted file...  You  COULD but it wouldn't be 
*fast*.  (You'd just be wrapping a delarative
syntax over iterating the rows or worse iterating them, putting them in 
a tree and THEN querying them...)

Secondly, if you have any choice in the matter BIFF8 (excel) is a CRAPPY 
transport format.  Meaning the file format
is bloated and inefficient.  You'd be better off dumping out text files.

However, if you don't have a choice, yes you'll have to do it a row at a 
time and compare.  Fortunately this is outstandingly easy.
If I were inclined I could probably write the whole thing in less than 
20 lines of code.


Qgh Rohgy wrote:

>I have a project which need an excel interface for the
>users to create/update/delete multiple records in the
>database tables.
>Could I use POI HSSF API for this purpose?
>I went through the API and realized that there is no
>easy way to do so. Unless I find the value of each
>Cell in the Excel file.
>Example :-
>Date   Amount
>3/13    20
>3/14    25
>3/12    15
>3/13    10
>I have 2 columns in my XLS file 
>Date and Amount.
>I want to update values in my Database of rows whose
>Date is greater than 3/12.
>Is there an efficent way of querying this in HSSF and
>then updating the Db table?
>Is it possible? How should I do it?
>Is there any other API that I could use?
>Thanks in advance,
>Do you Yahoo!?
>Yahoo! Web Hosting - establish your business online
>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-user-help@jakarta.apache.org

View raw message