Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7531595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:12:51+00:00 2026-05-30T05:12:51+00:00

I am trying to write a program that will append data to an Excel

  • 0

I am trying to write a program that will append data to an Excel file in Java. I got up to the following code. But it rewrites the contents in the Excel file, not appending to it. Please help me to complete this.

public class jExcel
{
    static WritableWorkbook workbook;
    public static void main(String args[])throws Exception
    {
        workbook = Workbook.createWorkbook((new File("D:\\0077\\my2.xls")));
        WritableSheet sheet = workbook.createSheet("First Sheett",1);
        Label label = new Label(5,2,"ssssssssss");
        sheet.addCell(label);
        workbook.write();
        workbook.close();
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:12:52+00:00Added an answer on May 30, 2026 at 5:12 am

    //WRITE IN XLS

        WritableWorkbook workbook = Workbook.createWorkbook(new File("D:\\output.xls"));
        WritableSheet sheet = workbook.createSheet("First Sheet", 0);
        Label label = new Label(0, 2, "A label record"); 
        sheet.addCell(label);
        workbook.write(); 
        workbook.close();
    
        //MODIFY XLS
    
        Workbook workbook1 = Workbook.getWorkbook(new File("D:\\output.xls"));
        WritableWorkbook copy = Workbook.createWorkbook(new File("D:\\output.xls"), workbook1);
        WritableSheet sheet2 = copy.getSheet(0); 
        //WritableCell cell = sheet2.getWritableCell(5, 2); 
    
        copy.write();
        copy.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a small java program that will accept a file
I am trying to write a java program that will automatically download and name
I'm trying to write a program that will write some data to a temporary
I'm trying to write a program that will fetch data from a SQL Server
I am trying to write a fragment program that will take a texture and
Hey there. I'm trying to write a small program that will read the four
I'm trying to write a program that reads text from external file (string string
I'm trying to write a program that takes a large file (of any type)
I'm trying to write a simple program that will receive a string of max
I trying to write a program that navigates the local file system using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.