Hi ,

we are using jave coroutines (nevaobject.src) for exporting /importing data to excel file from our java application and vise versa.

In excel 2003 its working perfectly fine .
If an excel file is already open with previous data export and we are trying to export data again then its creating new tab in same excel and exporting the data correctly but in excel 2007 and 2010 its exporting data intially for 1 time and if we are willing to export dat again then its giving error like :
java.lang.RuntimeException: Unable to create "Excel.Application" COMEXCEPTION: null HRESULT=0x800401f0 DISPEXC=null


major line of code related to this issue are:

in case of 2003 after hr = idsp.AttachDispatch(APPLICATIONCLASSNAME);
programme control is going to

if (!hr.success())

while in 2007 and 2010
programme control is going to catch part : throw new RuntimeException("Unable to create \"" + APPLICATIONCLASSNAME + "\" " + comex2);




Lines marked in yellow
if (application == null) {
COMHResult hr;
COMIDispatch idsp;
hr = COMClassObject.CoInitialize();
Debug.excel("Init #1 " + hr.success() + " " + hr.toString());
Debug.excel("Localization properties of operating system = " + COMIDispatch.GetSystemDefaultLocale());
// COMIDispatch.SetDefaultLocale(1033); //English
idsp = new COMIDispatch();
try {
idsp.AttachToActiveObject(APPLICATIONCLASSNAME);
}
catch (COMException comex) {
Debug.excel("No active EXCEL Service found, trying to start up EXCEL.");
try {
hr = idsp.AttachDispatch(APPLICATIONCLASSNAME);
}
catch (COMException comex2) {
throw new RuntimeException("Unable to create \"" + APPLICATIONCLASSNAME + "\" " + comex2);
}
}
if (!hr.success())
throw new RuntimeException("Unable to create \"" + APPLICATIONCLASSNAME + "\" HRESULT=" + hr);
application = new Excel(idsp);
}
return application;

Here we are using nevaobject.src 2003 . Following are further deatils:
Manifest-Version: 1.0
Extension-Name: com.nova.Coroutine
Specification-Vendor: Neva Object Technology, Inc
Created-By: 1.3.0 (Sun Microsystems Inc.)
Implementation-Vendor-Id: com.neva
Implementation-Vendor: Neva Object Technology, Inc.
Specification-Version: 4.1
Implementation-Version: 4.1

Do you expect any compatibility issue of nevaobject2003 with excel 2007 and 2010 ?

Regards,
Sukriti