Results 1 to 2 of 2
  1. #1
    gretags is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default Jexcelapi (protecting with password and removing all grids)

    Hi guys,

    I was working on converting some PHP excel program into Java (j2se). I used jexcelapi, so far I have not encountered any issue until I was trying to:
    1.) protect workbook with password.
    - I was able to protect the workbook, unfortunately I did not find anything in DOCS on how to protect it with password.
    2.) remove all grids.
    - I wanted to remove all grids. I can only remove the grid if I write into a cell, I don't want to do that... Still wasn't able to find anything on the DOCS...

    I hope anybody of you here had experienced with the Jexcelapi. Also below I attached the code.

    WritableSheet worksheet = this.excel.createSheet("HEADCOUNT ANALYSIS", 0);
    SheetSettings sheet_settings = new SheetSettings(worksheet);
    sheet_settings.setPrintGridLines(false);
    sheet_settings.setPassword("test");
    sheet_settings.setProtected(true);
    sheet_settings.setShowGridLines(false);
    worksheet.setProtected(true);

  2. #2
    gretags is offline Member
    Join Date
    Mar 2011
    Posts
    2
    Rep Power
    0

    Default Able to solve the problem...

    Ops...

    SheetSettings sheet_settings = worksheet.getSettings();

    This is the only solution... Sorry guys, I thought it passed object of the worksheet into the new object sheet_settings.

Similar Threads

  1. Protecting a file
    By PrinceSendai in forum JDBC
    Replies: 1
    Last Post: 10-22-2010, 08:15 AM
  2. Help with Arrays and Jexcelapi
    By Psyclone in forum New To Java
    Replies: 2
    Last Post: 01-30-2010, 06:25 PM
  3. Jexcelapi
    By Psyclone in forum New To Java
    Replies: 2
    Last Post: 01-29-2010, 09:21 AM
  4. protecting and tracking
    By paul21 in forum Advanced Java
    Replies: 3
    Last Post: 12-18-2009, 12:36 PM
  5. java grids
    By mayhewj7 in forum New To Java
    Replies: 1
    Last Post: 01-26-2009, 04:33 AM

Posting Permissions

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