How to create new sheet in existing workbook using Apachi POI jar

For example , existing workbook contain 2 sheets already, so, i want to add another or new sheet in that existing workbook as 3rd sheet,
how can i achieve this, please provide me with coding…

Train Asked on September 4, 2014 in Selenium WebDriver.
Add Comment
  • 2 Answer(s)

    Hi itsivaprasad,

    CanĀ  you give us the code that you have written till now? We can tell you the problem you have. Its quite hard to give a code that will suite your need.

    Thanks
    Virender

    Professor Answered on September 4, 2014.
    Add Comment

    Hi Sivaprasad,

    We can create a new sheet using Apache POI as below.

    HSSFSheet sheet1= workBook.createSheet(“sheet1”);

    Doctor Answered on September 5, 2014.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.