Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. using jxl to write formula in excel

using jxl to write formula in excel

Scheduled Pinned Locked Moved Java
javahelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prithaa
    wrote on last edited by
    #1

    Hello, I want to write a formula in excel through java but when I do the following a formula is displayed in the cell without displaying the results.The error with the formula is also seen.'A value used in the formula is of wrong data type' but the above error disappears if I reenter the same formula for the same data.I am using the following code to do with jxl libraries.

    StringBuffer buf = new StringBuffer();
    buf.append("MDETERM(A1:D4)");
    Formula f = new Formula(0, 11, buf.toString());

    Pritha

    N 1 Reply Last reply
    0
    • P prithaa

      Hello, I want to write a formula in excel through java but when I do the following a formula is displayed in the cell without displaying the results.The error with the formula is also seen.'A value used in the formula is of wrong data type' but the above error disappears if I reenter the same formula for the same data.I am using the following code to do with jxl libraries.

      StringBuffer buf = new StringBuffer();
      buf.append("MDETERM(A1:D4)");
      Formula f = new Formula(0, 11, buf.toString());

      Pritha

      N Offline
      N Offline
      Nagy Vilmos
      wrote on last edited by
      #2

      Me thinks the formula is wrong, try:

      buf.append("=MDETERM(A1:D4)");


      Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

      P 1 Reply Last reply
      0
      • N Nagy Vilmos

        Me thinks the formula is wrong, try:

        buf.append("=MDETERM(A1:D4)");


        Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett

        P Offline
        P Offline
        prithaa
        wrote on last edited by
        #3

        thanks for ur reply I tried that but it doesnt work and surprisingly

        buf.append("SUM(A1:a4)");

        works fine then why

        buf.append("MDETERM(A1:D4)");

        should have a problem

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups