Recalculation in excel thru java

Hi,
Thru java program i can able to read and write the values into the excel sheet. but...Latest re calculating values are not available to read
Example, for the following situation i am not getting right values
In worksheet1 cell A1 = 10 (writing this value thru java pgm)
worksheet1 cell B1 = 5 (writing this value thru java pgm)
worksheet1 cell C1 = A1 * B1 (writing this formula manually)
close the excel thru program
open the worksheet1 and read the cell C1 value thru program now newly calculated is not available.
if i open the excel sheet manually and read the cell value C1 thru program.then new value is available.
could you please help me.
thanks in advance
GS

I have a similar problem using a JDBC-ODBC bridge, and i solve it closing the connection after an update.

Similar Messages

  • Accessing excel from java code

    Hello
    our system uses reportNet to generate reports. When reports are generated in CSV format we have a problem:
    Report consists of people (can be more than one) so under name column we have same name in more than one row. BUT if more than one name is suppose to be in the CSV report then the header (column names row) is again printed.
    so for example if i requested rpeort for two names A and B (reportNet uses same template which is executed twice) then report will look like this
    Name (header - column name)
    A
    A
    A
    A
    A
    Name (header - column name)
    B
    B
    B
    B
    I want to be able to remove the second header that comes before B starts.
    so i was thinking i would be able to access this excel sheet from java. and keep record of every row. If the row changes from A to B...i delete the previous row (which would end up being the second header).
    Can this be done thru java. I havnt before accessed excel sheets from java so any pointers would be greatly appreciated.

    Hi, well CSV is not currently an Excel file, it is a Comma Separated Values
    file which can be read through Excel.
    Now, if you wish to remove the header, I would purpose that you develop an
    application that reads the CSV file, as it is mere text, and that it also reads
    another file (lets call it confirguration.txt) in which you determine the pattern
    you want to remove, then you just read your report and if a string line
    matches the pattern you defined in the configuration.txt file, then you simply
    erase it.
    And if you keep interested in reading real Excel files (xls), I would
    recommend you use POI-HSSF API from Apache.org
    http://jakarta.apache.org/poi/hssf/index.html
    Hope this helps, cya around.

  • Report in excel from java

    I'm generating report in Excel from Java.In this is it posssible to place background color upto the text in the single cell

    If you are using POI, you can set the background colour for a single cell.

  • Creating XML file in Project folder thru Java Program

    hi,
    i need one help. i need to create XML file in web://<Project Folder> in xmII thru Java Program. i created one java code and i am able to access XML file that is in c drive. i created jar file for this and placed as action block in Transaction and this working fine. but problem arises when i give file path in java code as web://<folder name>/file.xml which is in Web folder of project in xMII.
    How to access the file that is inside web folder from java code.
    regards
    senthil

    Hi Senthil,
    you can address the files that inside the MII workbench are viewed as "web://..." like this:
    http://<server>:<port>/XMII/CM/<Project>/<Folder>/<Filename>
    The workbench helps you find the correct filename:
    - open the WEB tab in the workbench
    - right-click on the filename
    - select "Copy Link" from the pop up
    Now you have the correct link in your clipboard.You can use the "web://" only inside MII.
    Michael

  • Please help how to run System commands and batch files thru java program

    Sir,
    I want execute OS commands like dir,cls..etc and batch files,.exe filesthru java program.
    I have tried it sofar thru Runtime.getRuntime().exec("execute.bat");
    but it is not working.anybody knows about how to run the system commands thru java please give me the code.
    thank you,
    regards,
    j.mouli

    I've seen other posts with this questions, and answers. Unfortunately I didn't pay much attention. But the basic idea is to exec command.com and pass the specifc batch or command as an argument.

  • Aspose.Excel for Java Plan before End of June, 2005

    Now we are working on Aspose.Excel for Java. It�s a Java equivalent of Aspose.Excel. The first version will be released at the end of June which will include the following feature list:
    1. Edit cells� data
    2. Style settings
    3. Manipulate worksheets
    4. Protect/Unprotect a worksheet
    5. Access rows and columns
    6. Excel file options settings
    7. Hyperlinks
    8. Freeze panes
    9. Page Setup
    10. Pagebreaks
    11. Data formats
    12. Formula
    13. Import/Export JDBC data abstractions
    14. Keep pictures, charts,drawing objects in template file
    15. Keep VBA/Macro in template file
    16. Keep Pivot Table/Chart in template file

    Sorry but you have the wrong forum.
    ka

  • Please help How can i run Os commands thru Java programs

    Hey,
    I want to stop and restart the linux server thru java program.Is it possible to run the os commands thru java program.
    I had it thru Runtime.getRuntime().exec("*.exe");
    it only runs the exe files.How can run files other than exe files like .bat,com ans shell commands..Any body knows please help with the code..or mail to this address
    [email protected]
    thankyou,
    regards,
    j.mouli

    What about "start command.com /C execute.bat", or using the overload that takes a String[] as argument?
    What if you use the the full path of execute.bat?
    What error code do you get?
    And what comes th linux, I'm not sure... you'll need a shell interpreter there too, me thinks. (never had to run anything with runtime.exec on linux). Check the man pages if csh, bash, ksh, or what ever shell you like.

  • Integrating Excel with Java

    Hi,
    How can Excel be integrated with Java such that if a user is working on an Excel , my Java application should be able to capture all the events from Excel Sheet.
    I have looked into POI, but it seems to me , it can read and wriite to Excel from Java, but i would like that if a user is making changes to a spredsheet then my Java Application should be notified about those changes
    In short, i would like to expose front end of a web application in Execl!
    Is there any open source package that can help in doing the integration
    Kindly share your views/ suggestions

    jschell wrote:
    If you just want most of what is occuring in Excel only then there are probably events in the Excel API (OLE >probably) that allow you to modify and react to changes. In my experience figuring out how to do that is very >difficult even for small bits of functionality.Can u please explain a little more on this.
    Can i use JNI to listen to COM server, probaly if i create some proxies for Excel that use JNI to listen to COM Server.
    I found a link on the internet http://www.ibm.com/developerworks/java/library/j-bridge/
    This Java bridge can integrate COM objects into their applications. But i am not sure if i can capture the live stuff from an Excel file when somebody is editing it.
    Also i would like to know, what should be the best stratergy when i would like to expose the Front end of an application in Excel , since the application involves a lot of numbers and users are more comfortable with Excel interface, and the rest of the application you want in Java.
    Kindly share your views on this!

  • How to run a simple shell comnd line on cygwin thru java class ?

    Hi
    I want to run a simple shell command "dir" on cygwin thru java class. My code is as follows :-
    public class CygJava {
         public static void main (String args[]){
              File workDir = new File("c:/cygwin/bin");
              try {
                   Runtime systemShell = Runtime.getRuntime();
                   Process shellOutput = systemShell.exec("dir", null, workDir);
                                                 InputStreamReader isr = new InputStreamReader(shellOutput.getInputStream());          
                   BufferedReader br = new BufferedReader (isr);
                   String line = null;
                   System.out.println("<OUTPUT>");
                   while((line = br.readLine()) != null ) {
                   System.out.println(line);
                   System.out.println("</OUTPUT>");
                   int exitVal = shellOutput.waitFor();
                   System.out.println("Process Exit Value : "+exitVal);
              }catch (IOException ioe) {
                   System.err.println(ioe);
              } catch (Throwable t) {
                   t.printStackTrace();
    On running this program , i get the error as :-
    java.io.IOException: CreateProcess: dir error=2
    Could anyone tell me as to why is this error occuring ?
    Thanks

    Hi guys,
    I am trying to launch a linux-environment application using cygwin from my java application.
    I already included the c:\cygwin path in the environment path of my computer, so if i run cygwin from windows console everything goes fine. But if i do the same from my java application, i get an error message:
    java.io.IOException: CreateProcess: cygwin error=2
         at java.lang.ProcessImpl.create(Native Method)
         at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
         at java.lang.ProcessImpl.start(ProcessImpl.java:30)
         at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
         at java.lang.Runtime.exec(Runtime.java:591)
         at java.lang.Runtime.exec(Runtime.java:429)
         at java.lang.Runtime.exec(Runtime.java:326)
         at prueba.Prueba.jButton1_actionPerformed(Prueba.java:94)
         at prueba.Prueba_jButton1_actionAdapter.actionPerformed(Prueba.java:151)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:5501)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
         at java.awt.Component.processEvent(Component.java:5266)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3968)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1778)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)I will appreciate a lot some help :)
    Thankx

  • How to access thru java stack

    Hi All
    can anyone pls let me know
    how to access sap thru java stack like what is ipaddress and port etc.
    Thanks in Advance
    Arun

    you can find full java administartion documentation at
    http://help.sap.com/saphelp_nwce10/helpdata/en/c8/cdfacc37efa84d914699ad31eb69b8/frameset.htm
    Also the link for accessing java page is
    http://<full hostname>:<port>
    full hostname- hostname of your SAP JAVA instance
    port no- 50000+100*Instance number
    Instance no- SAP system instance no
    Rohit

  • Returning CGI variables thru java

    I am trying to check the cgi environment variables on my application server 10.1.2. I am unable to get any of the ssl variables at all. I can run /cgi-bin/printenv and see all the variables. However I am unable to get them out thru java. I dont know if I am missing something in the configuration of the server or not. I have it set up to run SSL and SSLVerifyClient so the clients have to provide a valid certificate. I need to grab the information off of that certificate to authorize their access. Any help would be much appreciated. Thanks!

    We did figure it out. We needed to make the following changes in our 10.1.3 environment. It should be similar in the 10.1.2 environment.
    ssl.conf or httpd.conf -
    Set the following setting in a context (either VirtualServer, Location,
    Directory, or File - others may work)
    SSLOptions +StdEnvVars
    mod_oc4j.conf -
    Add the following lines to if IfModule context
    Oc4jEnvVar SSL_CLIENT_S_DN
    Oc4jEnvVar SSL_CLIENT_S_DN_CN

  • Invoking a registered executable in windows thru java ..

    Hi ,
    My requirement is that I need to invoke adobe (acroRd32.exe) thru JAVA passing some command line argument to it.
    I can invoke it using
         try
              Runtime runTime = Runtime.getRuntime();
              Process process = null;
              String command = "D:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe /p <filename>";
              process = runTime.exec(command);
         catch (Exception e)
              e.printStackTrace();
    but for this I need to know the exe path.
    The problem is that I don't want to read the registries to determine the path .. is there any way out for this?
    The Clue ..
    When I type a registered exe name in windows run command then it opens automatically. Can I invoke the same process thru java also?
    Any help in this regard will be highly appreciated ..
    TIA,
    -Arun

    Runtime r = Runtime.getRuntime();
    Process pro = null;
    try
      pro = r.exec("D:\\Program Files\\Adobe\\Acrobat 5.0");
      pro.waitFor(); //Program waits until Adobe is terminated.
    catch(Exception ex)
      System.out.println("Could not execute Adobe");
    }Hope this helps.
    Vijay :-)

  • Creating an ODF document thru Java

    How can i create a ODF text Document thru java ..

    What kind of document you want to create? ODS, ODT ?
    Do you need help on
    http://www.jopendocument.org/start_text_2.html ?

  • Adapter module to read excel file -java code required for PI 7.1

    Hi PI experts,
    I am working on PI 7.1 SP 08.
    I am trying to develope an adapter module to read excel file
    http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
    but here in this wiki , given java code is for pi 7.0 and it is using jar file from PI 7.0
    I tried with using corresponding PI 7.1 files
    com.sap.aii.af.lib.mod.jar:
    sap.comtcloggingjavaimpl.jar:
    com.sap.aii.af.svc_api.jar:
    com.sap.aii.af.cpa.svc_api.jar:
    com.sap.aii.af.ms.ifc_api.jar:
    jave program is not throwing any error in NWDS but After deploying file on server.
    i am getting this errot in communication channel
    2009-12-15 15:47:08 Information AO: Now calling the Convert Method to convert Excel to XML.
    2009-12-15 15:47:08 Error MP: exception caught with cause javax.ejb.TransactionRolledbackLocalException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBTransactionRolledbackException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file
    since i am not a JAVA expert so i am unable to resolve this error
    if some one has already deployed this module for PI 7.1, then please provide me java code for PI 7.1
    Thanks
    sandeep sharma

    hi,
    please try this:
    obj = inputModuleData.getPrincipalData();
    msg = (Message) obj;
    amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
    XMLPayload xpld = msg.getDocument();
    Workbook wb = Workbook.getWorkbook((InputStream) xpld.getInputStream());
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"+ "<ns0:"msgType" ""xmlns:ns0=\""nameSpace+"\">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++)
    xmldata = xmldata+"<Record>";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++)
    xmldata = xmldata"<"cellNames<i>.getContents()">"cells<i>.getContents()"</"cellNames<i>.getContents()+">";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata"</ns0:"msgType+">"; 
    wb.close();
    byte byt[] = xmldata.getBytes();
    xpld.setContent(byt);
    inputModuleData.setPrincipalData(msg);
    Thanks,
    Mayank

  • How to embed excel in java bean area on oracle forms 9i?

    Hi,
    I am trying to embed excel in oracle forms 9i using java bean. I want to open excel sheet in the bean area not as seprate application. Means i donot want to excel running separately from forms on the machine.
    If any body knows the solution please reply.
    Best regrads,
    Shiraz

    Hi
    Is it possible to create a java bean, with a click event which populates data from database table to an excel sheet.
    The data(can be obtained in a string format with delimiters, but can anyone help me in exporting this into an excel sheet). and also to provide user to take prints of the data in the excel sheet.
    If Print of the JTable could be done(by settin printable as this), but this involves unwanted buttons to be printed, and entire table is not available in the spread sheet format.
    Thanks in Advance
    Deepa

Maybe you are looking for

  • Gnome session start up programmes

    Running Arch on a Fujitsu Siemens Amilo laptop with 512MB RAM. 2GHz. Athlon proc. -getting a bit long in the tooth..and the laptop Which of these can safely be disabled in Gnome session start up programmes? 1. AT SPI Registry Wrapper 2. Disk Notifica

  • Dba_users_with_defpwd in Oracle 11G

    dba_users_with_defpwd view in Oracle 11G provides list of User ids which have default passwords. My question is any user who has select_catalog_role might be able to access this view and that user can review all the users whose password is default. W

  • Getting Applescript to read Arduino

    Hi everyone, First-time poster so please go easy on me   I've got an Arduino project that involves Applescript reading the Arduino's serial monitor. I think I've got the Arduino half going well, but I'm not sure how to Applescript a code that reads t

  • "Dynamic" Template/iViews possible?

    Hi, I have created a java WebDynpro application which uses ( via my own portal service ) the Rooms APIs and creates rooms. This works perfectly fine. During my little wizard, the user is able to choose a template for the room creation, similar to the

  • Rollback segemnt error

    Hi, I am working in oracle8i. I am receiving the error in Rollback segment. ORA-1650: unable to extend rollback segment ROLUS12 by 256 in tablespace RBS How to resolve the error. we have already 21 GB space for rollback segment. Is there any way to r