This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

java code to rowspan and colspan in excel using poi.

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello


I am writing the data in excel sheet using poi jar file.

I bring the data from database.

My problem is I am not able to apply rowspan and colspan in excel as we do in table format.


My excel sheet should have the data in format shown below

My first heading is date which is to be rowspaned to 2 where the 1st row will have heading as OUTGOING and 2nd row will have INCOMING.

second heading outgoing should have colspan of 7 which includes 7 columns from n07 to total.

similarly incoming should also have colspan of 7 which includes another 7 columns from n07 to total. as shown below.

how do i bring it to this format

please help.



DATE OUTGOING INCOMING
N07 N08 N09 N10 R41 R42 Total N07 N08 N09 N10 R41 R42 Total
2012-01-01 2 0 0 0 0 0 2 1 0 0 0 0 0 1
2012-01-02 0 0 0 0 0 0 0 1 0 0 0 0 0 1
2012-01-03 1 0 0 0 0 0 1 1 0 0 0 0 0 1
2012-01-04 0 0 0 0 0 0 0 0 1 0 0 0 0 1
2012-01-05 0 0 0 0 0 0 0 0 1 0 0 0 0 1
GRAND TOTAL 3 0 0 0 0 0 3 3 2 0 0 0 0 5

 
I wish to win the lottery. I wish for a lovely piece of pie. And I wish for a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!