JExcel API : Locking a cell

Hi all,
Can anyone please suggest how to lock a cell so that it becomes non-editable/disabled using the WritableCellFeatures in JXL..
Thanks in advance.

Use CSS to style your table.
table {
    width: 600px; /**adjust width as req'd**/
    margin: 0 auto;  /**width width, this is centered**/
    border: 1px solid #666; /**optional border**/
th {
    background: #333;
    color: #FFF;
td { padding: 0; }
.bg { background: #C69 url(your_background.jpg) no-repeat; }
HTML:
<table>
<tr>
<th>Table Heading</th>
<th>Table Heading</th>
<th>Table Heading</th>
</tr>
<tr>
<td class="bg">This cell has a background</td>
<td>This cell has no background</td>
<td>This cell has no background</td>
</tr>
</table>
Nancy O.

Similar Messages

  • Re: [JExcel API] how to insert object into a cell

    Hi all,
    i am using JExcel API for Excel file creation. i want to
    insert object like file in particular cell how can i do it.
    i tried WritableHyperLink but it is only inserting hyper link.
    i want proper object inserted into the specific cell.
    please help me out.
    VenuG.

    I am using jxl api to generate a report. i want the insert->object->create from file excel functionality to be implemented using jxl. Help me

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • How to use JExcel API (excel,csv)

    Hi,
    I have my java application and I want to read an excel file (.xls) using the Jexcel API to convert a part of it into csv format or a xml format (to make after a pdf file with another java library).....
    How can I do it? I need only the first steps!!! I don't know where must I start!!
    Thanks a lot

    to read Excel files using JExcel, look at the docs API first. The code you'll need looks like the following:
    Workbook workbook = Workbook.getWorkbook(new File("D:/tmp/source.xls"));
    import jxl.Cell;
    import jxl.Sheet;
    import jxl.Workbook;
    import jxl.read.biff.BiffException;
    Sheet sheet = workbook.getSheet(3);
              int cols = sheet.getColumns();
              int rows = sheet.getRows();
              Cell cell = null;
                   for (i = 1; i < rows; i++) {
                        for (i = 1; i < rows; i++) {
                          cell = sheet.getCell(j, i);
                          //System.out.println(cell.getContents());
                   }In order to generate PDF after, you can use iText or FOP.
    iText doesn't require XML. It uses simply java objects. (http://www.lowagie.com/iText/)
    If you want to generate XML file first, so use FOP. It requires XML and XSL files to generate PDF. (http://xmlgraphics.apache.org/fop/)
    Personnaly, I used the two tools (iText and FOP). I prefer iText because it simple and can generate complex PDF.
    hth

  • Jexcel api

    Hi all,
    If any one has used jexcel api to show a drop down box in excel sheet please share the code... or any help for the same is higly appreciated.
    Thanks in advance.

    Hi all,
    I found the solution to my problem,
    For implementing <option name="x" value="0"> smiliar in html in Excel sheet
    you need to do a work around , something like writing the name in the data validation list and the value in a hidden cell
    and when the drop down is changed to select some name corresponding value will be selected by accessing the hidden cell.
    To export data to excel sheet
    using jexcel and want to show a drop down(i.e. dataValidationList), normally you will find the below code to do so -
    /* Start Code */
    //Create a blank obj with row and col num
    Blank b = new Blank(1,1);
    //Create a array list and put objs which u want as list
    ArrayList arrList = new ArrayList();
    arrList.add("DropDown1");
    arrList.add("DropDown2");
    arrList.add("DropDown3");
    //Create writable cell features obj
    WritableCellFeatures cellFeatures = new WritableCellFeatures();
    //set the array list in writable cell features
    cellFeatures.setDataValidationList(al);
    //set the cell features in the blank class
    b.setCellFeatures(cellFeatures);
    //add this blank class to writable sheet
    sheet.addCell(b);
    //write to workbook
    /* End Code */
    The above code will just create a Data Validation List with default value as blank
    to have default value as selected don't use the blank class to write to cell , use Lable instead
    Below is the code for doing this -
    /* Start of Code */
    cellFeatures = new WritableCellFeatures();
    ArrayList al = new ArrayList();
    al.add("bagpuss");
    al.add("clangers");
    al.add("ivor the engine");
    al.add("noggin the nog");
    cellFeatures.setDataValidationList(al);
    Label checkLabel = new Label(1,63,(String)al.get(1));
    checkLabel.setCellFeatures(cellFeatures);
    s1.addCell(checkLabel);
    // write to workbook
    /* End code */
    above code will create a list(DropDown) with values "bagpuss,clangers,ivor the engine,noggin the nog"
    with selected value as "clangers"

  • EPM Formatting Sheet Issue - Right click on the cell and lock the cell

    Dear Experts,
    I have come across an issue. Earlier I worked on BPC NW 10 integrated with Ms Excel 2007. I applied a feature of locking the cell linked with specific member in Input Template and Report by going to EPM Formatting Sheet, selecting dimension member (Which I want to lock in Input Sheet and Report), right clicking on the cell under Data Column and selecting the option "Lock the Cell". As I protect my Input sheet and Report, and do refresh, the cell linked with specific dimension member get locked. Hope everyone has used this feature.
    Now I have Ms Excel 2013 installed in system. I am not able to find this feature. if anyone has tried this feature in BPC NW 10 with Ms Excel 2013. Please help me out. As this was good feature by BPC.
    Regards,
    David

    Hi Andy,
    I am using Excel 2013, When I checked, I did not find "Lock Option". When I was using Excel 2007, then I had this locking option. below are the details that you asked for...
    When I right click on cell in EPM formatting sheet, I get options as shown below in screen shot, but there is no "Lock Option"
    Regards,
    David

  • How do you lock individule cells in numbers on ipad

    how do you lock individule cells in numbers on ipad

    Wayne, are you sure its iOS numbers that can lock the table? If so, could you please show me how? Havent figured it out yet.
    Thanks
    Jason

  • How to enable macro's again (Lock Selected Cells)

    Hi All,
    I am using the EPM addin for excel for demand planning. I would like to lock certain cells in the by clicking the following option on the formatting sheet:
    However, I get the following error:
    I did not disable any macro's manually, so I do not know how this comes. Can anyone tell me how to enable these macro's again?
    KR,
    Kristof

    I tried to do so on another workbook and here another macro seems to fail as well.
    When trying to add a specific member in the formatting sheet, the following error occurs:
    I think that somewhere, all macro's are disabled but I cannot find any way to reverse this...
    Kristof

  • How to "lock" a cell reference in Numbers??

    HELP! I am a recent convert from Windows based machines to Apple. I am very familiar with Excel and need to figure out how to do something in Numbers....
    I need to know how to lock a cell reference so that when you drag the formula down or across it keeps the same cell reference. In Excel you can do this by picking the cell and then hitting F4 to either lock the column, row or both.
    Anybody out there help a newbie?? Thanks

    Thanks Jerrold, I'm using them that way. My request has to do with
    using them as an Absolute Reference versus a relative reference.
    If I specify a header ref for a cell in a formula, when I drag that
    formula to some other cells I want Numbers to treat it as absolute,
    ie. as if I had said $A$5. What I am finding is that it does it's default
    behaviour, ie. it is translating the formula reference to a new cell just
    as it would do for a reference like A5.
    ie. with header references, what is the equivalent of specifying $A$5?
    ($header name doesn't work ).
    thx, rob

  • How can i lock a cel so that you can't Change it

    How can i lock a cel so that you can't Change it (on iPad)

    Dont think you can on ipad numbers.
    Jason

  • Can I lock individual cells in Numbers like I can in Excel?

    I need to lock specific cells to protect the formulas in those cells.  Is there anyway to do this in Numbers like there is in Excel?

    Michelemazza wrote:
    I need to lock specific cells to protect the formulas in those cells.  Is there anyway to do this in Numbers like there is in Excel?
    No, Michele, you can only lock entire tables. What you must do is to segregate your stuff into what needs to be locked and what needs to be not locked, in separate tables, lock one table and keep the other open.
    Jerry

  • Java and Excel : POI vs JExcel API?

    Hello,
    I am hesitating between using the JExcel API and the Jakarta POI API to manipulate (rather simply) excel files with java.
    Has anyone experimented both? What are the drawbacks and the advantages of both?
    Thanks a lot,
    Laetitia

    Laetitia,
    Hello! I've written a significant app (J2EE, EJB using WebLogic) utilizing first the POI api and then the jexcel API to produce MS excel output financial reports (for online content provider) . The application processed 80K plus lines of subscriber information, calculated monthly subscription delivery charges for 100+ publications, each with custom contracts and wrote the calculated data to 'reporting tables'. Basically a specialized datamart of sorts (I know little about 'true' data marting). App would then generate the ms excel spreadsheet reports, one per publisher, utilizing the excel API. The largest publisher report would be over 10Mb in size, containing some 40K rows of data, 30 columns wide.
    I utilized the POI api first because it looked to be a more substantial product with firmer support, more developers, etc. However I soon became confused on how different modules worked, received slow feedback from the development team, and found the documentation to be horribly out of date and misleading. Additionally, the larger the generated excel file became the less stable the server would be until it would crash with memory problems. I'm not saying that the memory errors were within the POI code, but after I switched to jexcel the server crashing went away (perhaps the jexcel code is more forgiving).
    I then switched to use the jexcel API and was immediately pleased. The documentation was accurate and clearer. The functionality I needed was easy to find and worked first time. When I had problems I posted my questions to the yahoo message board and was immediately helped. As an aside on the message board I'm an old internet hack with message boards and am used to stupid posts (and posters) being immediately 'flamed' and derided by those on the list 'in the know'. I was amazed by all the posts from people asking 'I just downloaded jexcel and need help' who actually got thoughtful and helpful posts, not just rude 'RTFM you @#%$$@%' replies.
    Jexcel API was written by one guy but seems to be supported by several. I'd recommend it strongly - new releases come out continually and it's easy to get answers to questions on how to use it. Plus, and this is a biggy with me, the documentation is accurate and useful.
    Email me for more.
    -wcrighton
    [email protected]

  • Installing JExcel API

    Hello Everybody,
    I've posted some messages before about using JExcel API.
    Will, Finally it worked with me, and this is how it��s done; I just thought it will be helpful to be archived
    First: Download Andy Khan��s JExcel API from (Free JExcel API) :
    http://www.andykhan.com/
    Next: extract the zipped file to the C:\ drive (or any other drive)
    e.g. C:\jexcelapi
    Now you need to set the CLASSPATH to have the Jar file
    *(Windows users)* Go to: Control Panel �� System �� Environment Variables
    If you don��t yet have a system variable called CLASSPATH, create a new one and add the following path to it (including the dot and the semicolon)
    .;C:\jexcelapi\jxl.jar
    Then set JAVA_HOME to include your JDK path :
    e.g.     C:\Program Files\Java\jdk1.5.0_01
    Assigning CLASSPATH Using CMD (Dos):
    C:\jexcelapi> set CLASSPATH=.;C:\jexcelapi\jxl.jar
    Now you are done.
    To run the Demo provided with the API
    Type the following lines in the CMD window:
    C:\jexcelapi\src>javac jxl/demo/Demo.java //compile
    C:\jexcelapi\src>java jxl.demo.Demo // run
    Jxl.demo is the package provided; you need to add it to each program you create as the first line of the code
    package jxl.demo; Regards,
    MOE

    The servlet api gets installed with any web server that you install. For example if you are installing Jeeves(Java Web Server) you will find a file called servlet.jar which contains all the servlet classes. The path is ./JavaWebServer2.0/lib/servlet.jar.
    Hope that helps.
    Regards
    Jaydeep

  • JExcel api jxl.jar problem

    hi,
    I just downloaded the Jexcel API from source forge. i added the jxl.jar file to my classpath and wrote a small program. But i am getting the following error.
    Read_Excel.java:4: package jxl does not exist
    import jxl.*;
    ^I am running my program through command promt only. and i have added the jar also to folder C:\Program Files\Java\jre1.6.0_04\lib\ext
    But still same problem.
    Please help.

    Opening a new command shell and working from there, would have worked, too, but hey, if you wanted to take the time to reboot, more power to you.

  • Locking a cell position

    how do you lock a cell position over the background so it is in the same place on the background on any browser.

    Use CSS to style your table.
    table {
        width: 600px; /**adjust width as req'd**/
        margin: 0 auto;  /**width width, this is centered**/
        border: 1px solid #666; /**optional border**/
    th {
        background: #333;
        color: #FFF;
    td { padding: 0; }
    .bg { background: #C69 url(your_background.jpg) no-repeat; }
    HTML:
    <table>
    <tr>
    <th>Table Heading</th>
    <th>Table Heading</th>
    <th>Table Heading</th>
    </tr>
    <tr>
    <td class="bg">This cell has a background</td>
    <td>This cell has no background</td>
    <td>This cell has no background</td>
    </tr>
    </table>
    Nancy O.

Maybe you are looking for

  • After upgrading my iphone 5 to IOS 7, the iTunes Store won't open. Is there a fix for this?

    After upgrading my iphone 5 to IOS 7, the iTunes Store won't open. Is there a fix for this?

  • Movement of accounts in AD natively; How Sun IDM identity is affected

    Dear Reader, We are planning to integrate Windows Active Directory with Sun IDM 6.0 SP1. Even after integrating AD with Sun IDM there will be lots of changes to the native account like especially moving the account from one OU to another etc Since Su

  • Refresh toplink cache from tirgger

    How to update the toplink cache due to change in the database by some external process or procedure? This question was posted some time back and one of the suggestion was to create a trigger on the table holding the data and implement callout to the

  • [Solved] xfce4-power-manager broken in Xfce 4.10?

    EDIT: I found out that the "Lid closed"-event is apparently now also recognised as a "Sleep button"-event by the kernel. Both events triggered a suspend command when I closed the lid, which led to some weird shit. Last edited by IceHand (2012-06-18 1

  • 2 ipods 1 big problem!!

    My daughter has an ipod registered on our computer,now I have gotten one and registere it. The problem is that Her music is now missing off her ipod and my music is showing up under name and wanting to load on her ipod. How can we have seperate itune