Invoking MS Excel from Java
HI,
I'm trying to create a standalone application that would need to logon in a database.If the user is a valid one, the user can then choose which table he wanted to update. All the rows of the column will be shown in an excel format. (the program will invoke Excel to show all the records in that table). From that, the user can edit the content and after saving it, data in the databse will also be updated.
Is there any Java API that I can use to make this application possible?
Thanks,
Crossposted: http://forum.java.sun.com/thread.jspa?threadID=678912
Please don't answer on this duplicate copy.
And @OP: QUIT IT!
Similar Messages
-
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.
-
How to invoke dos shell from java program
Hi,
I'm not able to invoke dos shell from java.
Can any one help me in this issue.
I'm providing the source code below:
try{
Runtime.getRuntime().exec("cmd.exe")
catch(IOException e) {
System.out.println(e.getStackTrace());
ThanksDoes it throw a different exception?
Or does it just do nothing at all?
It does nothing at all[/b
Is this a standalone Java app?
Or a Java Applet running via a webbrowser? [b]It's a standalone application -
How to invoke BPEL process from JAVA API
Hi Guys
Any idea if you can tell me how to invoke BPEL process from JAVA API ?
What to do in BPEL process manager to achieve that?
Regards
DeepakSee http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28981/invoke.htm#sthref1373 and the JavaDocs http://download-west.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm.
-
Invoking Microsoft Word from Java code
I want to invoke Microsoft word from Java code. How can i do this plz ............... Help
do something along these lines.... here is an example with notepad
create a .bat file with the commmand in to run notepad for example
notpad c:\test.txtthis command calls notepad and passes it the argument C:\test.txt which is the file and it's location, that I want to open.
The Java program
import java.util.*;
import java.io.*;
public class Run
public static void main(String args[])
try
//the name of the batch file with your commands in
String command ="runprog.bat";
//get the runtime
Runtime rt = Runtime.getRuntime();
//run the bat file
Process proc = rt.exec(command);
//wait for the program to exit i.e notepad then get the return code
int exitVal = proc.waitFor();
//print out the exit value
System.out.println(2THe Process exit value is: " + exitVal);
catch(Throwable t)
t.printStackTrace();
}have a look at this
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
and this
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html -
Invoke beanshell methods from java
Hello
I'm learning beanshell and using it to write scripts that are ran in JDK 6.
My question is how to invok beanshell methods from java source codes.
My codes is:
import javax.script.*;
public class InvokeFunctions {
public static void main (String[] args)throws ScriptException, NoSuchMethodException
ScriptEngineManager sem = new ScriptEngineManager();
ScriptEngine bshEngine = sem.getEngineByName("beanshell");
String script = "public void sayHello()"+"{print (\"sayHello() is a method in bsh script\");}";
bshEngine.eval(script);
Invocable inbshEngine = (Invocable)bshEngine;
inbshEngine.invokeFunction("sayHello");
I defined a method "sayHello()" using beanshell, but i just can't invoke it in Java.
I got an error msg said:
Exception in thread "main" java.lang.IllegalAccessError: tried to access method bsh.NameSpace.getThis(Lbsh/Interpreter;)Lbsh/This; from class bsh.engine.BshScriptEngine
Any one has any idea about it?
ThanksLook at the Javadoc documentation of IllegalAccessError. It says:
Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
Maybe recompiling all your sources (make sure you delete all existing *.class files) will help? -
Can you give me an example of where or why you would invoke a CFC from Java? I have used CF to call Java and then having Java return "data" back to the CFC but not sure I know why I would want my Java to invoke a CFC.
ThanksHi,
how to invoke a exe file from a java program. (
operating system: windows )
is it possible ?Yep.
Navigate yourself around pitfalls related to the Runtime.exec() method -
Invoking dos commands from java
hi all,
I just want to invoke dos prompt from java.I know it can be done using "Runtime.getRuntime()" command.But when i try to create a directory inside another directory,how can i specify the path of the destination directory.i googled as well as tried different things.But i failed to make it up.Please help me solve this problem.
thanks in advance
RegardsHai,
Thanks for your respond.
If I give "cmd" command only, I am getting dos command window, but I didn't get the prompt like
c: or d:
How can I do it?
Expecting more helps
Joseph -
Invoking C# WS from java axis proxy generated from the same WSDL
I am trying to transparently use the same java interface for invoking a java axis WS and a C# WS generated from the same WSDL interface.
I believe the problem may be that the .NET web service which is generated from the WSDL file, is dynamically exposing a WSDL file which is not exactly the same as the original WSDL used to generate the abstract C# class with "wsdl.exe"
When I try to invoke the C# web service with the java axis client I get the error message:
"Server did not recognize the value of HTTP Header SOAPAction: ."
Any suggestions about how to be able to use the same client interface from java, to invoke a C# web service and a java axis web service supporting (i.e. generated from) the same WSDL ?The JNI method name in the .h file is different to that in the .c file.
-
Invoking Bpel Process from JAVA
Hi I am new to BPEl.
I am trying to Invoke Bpel From Java client provided in samples...
i am getting
java.lang.NullPointerException
at this line..
Map payload = res.getPayload();
The Bpel Process is on my local machine...
i kept the properties file as it is....
Can any one Respond please.....Hi
now i am getting this exception
java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NamingException: Lookup error: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext; nested exception is:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext [Root exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext]
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:168)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218)
at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)
at com.oracle.bpel.client.Locator.<init>(Locator.java:140)
at com.oracle.bpel.client.Locator.<init>(Locator.java:111)
at com.otn.samples.RMIClient.main(RMIClient.java:49)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionContext
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:1655)
at java.lang.Class.getDeclaredMethod(Class.java:1262)
at java.io.ObjectInputStream$1.run(ObjectInputStream.java:1198)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectInputStream.auditSubclass(ObjectInputStream.java:1190)
at java.io.ObjectInputStream.verifySubclass(ObjectInputStream.java:1171)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:248)
at com.evermind.io.ClassLoaderObjectInputStream.<init>(ClassLoaderObjectInputStream.java:16)
at com.evermind.server.ejb.EJBInputStream.<init>(EJBInputStream.java:35)
at com.evermind.server.rmi.RMIInputStream.<init>(RMIInputStream.java:20)
at com.evermind.server.rmi.RMIConnection.createInputStream(RMIConnection.java:2417)
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2555)
at com.evermind.server.rmi.RMIConnection.connect(RMIConnection.java:2361)
at com.evermind.server.rmi.RMIConnection.lookup(RMIConnection.java:1800)
at com.evermind.server.rmi.RMIServer.lookup(RMIServer.java:676)
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:149)
... 6 more
can you say how to fix this... -
Invoking bpel process from java in oracle soa/bpm 11g
Hi,
We have some java code to invoke bpel process in oracle BPM 10g following the instructions in http://download-east.oracle.com/docs/cd/B14099_19/integrate.1012/b14448/invoke.htm.
Basically the steps are:
1) get a Locator (com.oracle.bpel.client.Locator)
2) get IDeliveryService (com.oracle.bpel.client.delivery.IDeliveryService) reference from locator
3) call IDeliveryService method request or post with input message and get the response back.
Recently we want to migrated from oracle bpm 10g to oracle soa/bpm 11g. But I can not find the similar API in 11g. It seems now some adapter/binding need to be added in exposed service lane in soa composite view, for example, ADF-BC, direct binding etc, in order to allow java to invoke a bpel process. Here are two very useful links from Edwin about the detail how this is implemented.
http://biemond.blogspot.com/2009/11/invoking-soa-suite-11g-service-from.html
http://biemond.blogspot.com/2009/11/calling-soa-suite-direct-binding.html?showComment=1285198033913#comment-c1055322845511794252
My question is:
1) what are the choices and the official/best way to invoke a bpel process in oracle soa/bpm 11g from java?
2) does user need to add an adapter/binding in exposed service lane in order to let the bpel service be called in java?
3) what is the real difference between a bpm application and soa application in 11g?
I will really appreciate any expert's opinion.
Thanks,
BinThanks for your reply and confirmation, really appreciate it.
Yes, I found the difference of the invoking process API and was able to invoke bpel process using direct and ADF-BC binding by following Edwin's blog. But I have not found any official reference to compare this API difference between 10g and 11g ( I will mark this question as answered if anyone can find an official source from oracle, need to prove it to the team). The API to work with human task workflow seems pretty much the same between 10g and 11g. -
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. -
Excel from JAVA or C++ -- Urgent -- help
Hi
I know it might not be possible, but i want to use couple of Financial Functions which excel provides within itself.
Is there anyway i can use them from my JAVA or C++ code ?
In short, would it be possible to call excel functions from JAVA or C++ code
TIA
VikramActually you can... In quite a few different ways. You can access any COM or OLE object in windows from within java by using the Java/COm bridge, or purchasing shrink wrapped products... The links are below:
These people provide some very cool solutions for java. This link is specifically for excel.
http://www.intrinsyc.com/pdfs/java-excel_bridge.pdf
Some Resources for Java/COM...
http://users.rcn.com/danadler/javacom/ -
Hi ,
could any one help me in creating two excel worksheets from Java.
I know using <%@ page contentType = "application/vnd.ms-excel" %> it will create workbook and reads data from html table .
But I want the data from 2 html tables into 2 excel work sheets with in the same work book ..
Thanks in Advance.Maybe Jakarta's POI can help you out.
-
Invoking command prompt from Java
public class NewClass2 {
public static void main(String[] args) {
Runtime p = Runtime.getRuntime();
p.exec("cmd");
I would like to invoke dos prompt from my java application. The above code is not working. What could be the problem? I am using Windows XP m/c with netbeans.jjegan wrote:
public class NewClass2 {
public static void main(String[] args) {
Runtime p = Runtime.getRuntime();
p.exec("cmd");
I would like to invoke dos prompt from my java application. The above code is not working. What could be the problem? I am using Windows XP m/c with netbeans.You didn't give it hands and feet, i.e. you can't expect the cmd.exe process to fire up a terminal for its input and output; you have to do that yourself. Read all about the Input- and OutputStreams of those sub-processes in the API documentation of the Processs class.
kind regards,
Jos
Maybe you are looking for
-
Apple TV Video Out To Native Possible?
Is there a way to get the Apple TV to output native resolution instead of upscaling it to the resolution of the TV? If you have a mixe of 480P and 1080P movies to stream but prefer that the outboard preamp do the video scaling instead of the Apple TV
-
I installed the new software last night on my 4s. I am not able to use Imessage or Facetime. It shows a message of waiting for activation and asks for me to use my itunes login? Once I try and log in a message says could not sign in check network con
-
Hi all, How can I map the same portal web app into different virtual hosts Thanks, karthi.
-
Monitoreo con Lookout por Internet
Que tal, me gustaria saber si es posible monitorear un proceso desde internet teniendo el Software de Lookout y una tarjeta de adquisición de datos de un PLC Siemens serie 300 mediante la conexión pofibus (PCI1500 PFB)
-
E MAIL IN BOX DISAPPEARE​D
My daughter put a friends sim in her phone. When she put her own sim back in she had lost her email inbox. She tried going online to tmobile but it just said it had moved and a new email address had been detected. . She is unable to find it or dele