| Author |
Using JXL to edit an existing excel sheet withe new data
|
m sandeep
Greenhorn
Joined: Jan 24, 2011
Posts: 17
|
|
Hi ,
i am having an excel sheet say excel1 annd i am having another excel sheet excel2 .I need to transfer the data of excel1 to excel2.Now my problem is whenever i am tring to do it the data present in excel2 is getting lost and new data rom excel1 is getting in excel2 .
Please suggest me with some code to do this .I NEED TO THIS ONLY WITH JXL NOT POI.
REPLY SOON
Thanks
sandeep
MY COde is BELOW
[Edit: added code tags, removed urgent from subject line, ignored shouting]
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
Hi m sandeep and welcome to Javaranch!
I would look at your variables and where they are pointing to very carefully, perhaps splitting the read from sheet 1 and write to sheet 2 into separate methods will help clarify.
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
m sandeep
Greenhorn
Joined: Jan 24, 2011
Posts: 17
|
|
thanks for your reply.
Can you please elabourate on what you are saying ,If possible can you please paste a code of what you are exacting saying.
I cant lose data from excel 2 i just what even data from excel1 to excel2.
Suppose i have 10 names in excel 1 and 5 names in excel 2 .I want to add the 10 names of excel 1 to excel 2 and make it 25.But i am not sure that how many names will be in excel 2 .So i want to know how to find an empty cell in an excel???
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56202
|
|
|
Please read: EaseUp
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
patil kasinath
Greenhorn
Joined: Aug 07, 2011
Posts: 5
|
|
File f1=new File("c:/sandeepNew/sandy1.xls");
can you please specify the code for path where my file is in server, so how can i read this file
i used ContextPath() method to get path and i mention like this
new File("path/files/test.xls");
im getting FileNotFoundException.
can you please help me, how can i mention path to get that file.
|
 |
patil kasinath
Greenhorn
Joined: Aug 07, 2011
Posts: 5
|
|
patil kasinath wrote: File f1=new File("c:/sandeepNew/sandy1.xls");
can you please specify the code for path where my file is in server, so how can i read this file
i used ContextPath() method to get path and i mention like this
new File("path/files/test.xls");
im getting FileNotFoundException.
can you please help me, how can i mention path to get that file.
|
 |
 |
|
|
subject: Using JXL to edit an existing excel sheet withe new data
|
|
|