Results 1 to 2 of 2
  1. #1
    jmHoekst is offline Member
    Join Date
    Jun 2008
    Rep Power

    Smile Writing to excel file erasing existing formatting


    I am using the Java Printwriter to write to an excel file. I have a template for my excel file, with some alternating line colors and a frozen pane so my header is visible when the file is scrolled down.

    However, whenever I write to the file, all the background coloring disappears and the window pane unfreezes before my data is written.

    Does anyone know why Java decides to erase everything in the file before it writes? Do I need to tell Java to append to the file instead of writing to it?

    Thanks for the help.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power


    Yes. The default is to replace. Read the API doc for the output constructor looking for the append parameter.

Similar Threads

  1. writing to a excel file from java program
    By priyankabhar in forum New To Java
    Replies: 15
    Last Post: 01-17-2014, 01:39 PM
  2. Reading data from Micrsoft excel and writing to notepad
    By abhishek.jain in forum New To Java
    Replies: 4
    Last Post: 01-29-2009, 09:12 AM
  3. Run J2ME application using existing jar file
    By chale in forum CLDC and MIDP
    Replies: 0
    Last Post: 08-25-2008, 03:11 PM
  4. Replies: 0
    Last Post: 07-31-2008, 11:44 AM
  5. Replies: 9
    Last Post: 07-10-2008, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts