You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Alec Swan <al...@gmail.com> on 2011/09/21 22:35:43 UTC
Replace Excel sheet with CSV data from another file
Hello,
Could anybody provide some ideas on how to replace all data on one of
the sheets of an Excel file with data from a CSV file?
Thanks,
Alec
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
RE: SPAM Replace Excel sheet with CSV data from another file
Posted by Alex Panayotopoulos <Al...@vianet.co.uk>.
Hi Alec,
Perhaps you could simply iterate through it? OpenCSV would be the most obvious library to use.
Thanks,
Alex
<font size="2" face="Verdana" color="grey">If you wish to view Brulines Group email disclaimer please <a href="http://www.brulines.com/investors/emaildisclaimer.aspx">click here</a></font>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Replace Excel sheet with CSV data from another file
Posted by Alec Swan <al...@gmail.com>.
Thanks
On Thu, Sep 22, 2011 at 3:50 AM, Nick Burch <ni...@alfresco.com> wrote:
> On Wed, 21 Sep 2011, Alec Swan wrote:
>>
>> Could anybody provide some ideas on how to replace all data on one of the
>> sheets of an Excel file with data from a CSV file?
>
> Firstly you'll need something to read CSV files. There are lots of libraries
> out there (including Commons CSV from Apache), pick one that works for you
>
> Then, create a new sheet / clean an existing one
>
> Finally, iterate through the csv, creating rows and cells and populating.
> Job done!
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Replace Excel sheet with CSV data from another file
Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 21 Sep 2011, Alec Swan wrote:
> Could anybody provide some ideas on how to replace all data on one of
> the sheets of an Excel file with data from a CSV file?
Firstly you'll need something to read CSV files. There are lots of
libraries out there (including Commons CSV from Apache), pick one that
works for you
Then, create a new sheet / clean an existing one
Finally, iterate through the csv, creating rows and cells and populating.
Job done!
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org