I am working on a requirement where i have 2 excel, each excel has 1 sheet. and I have to create an other excel which should have both sheets of my input excel using Apache POI.
Asked
Active
Viewed 518 times
1
-
I'm quite sure that you can only do this by copying cell by cell from one file to the other. – AlvaHenrik Jul 31 '17 at 16:29
-
Yes, i am also trying out something like this only. but no firm results yet. – umar faraz Aug 01 '17 at 07:45
-
the main problem with copying cells is that you have to handle the different cell types (text, number, date, formulas) differently. you will end up with quite some code if you want to do this properly. if you want to copy style and formats as well it gets even worse. :-( I wonder if you have xlsx files if playing around with the XML code is easier at the end of the day. – AlvaHenrik Aug 03 '17 at 18:12
-
The file format i have is .xls i need to only use HSSF as per my requirement. – umar faraz Aug 04 '17 at 06:00