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

    Smile Writing to excel file erasing existing formatting

    Hello,

    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 online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,423
    Rep Power
    25

    Default

    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, 12: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, 08:12 AM
  3. Run J2ME application using existing jar file
    By chale in forum CLDC and MIDP
    Replies: 0
    Last Post: 08-25-2008, 02:11 PM
  4. Replies: 0
    Last Post: 07-31-2008, 10:44 AM
  5. Replies: 9
    Last Post: 07-10-2008, 04: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
  •