Schubert. Thank you for your reply.
Yes.
-Excel launches manually
-Excel export from DOORS working
-I am able to open Excel.Application from WORD VBA with following code:
---------------------------
Sub exop()
Dim excelApp As Excel.Application
Dim openExcel As Workbook
Set excelApp = New Excel.Application
Set openExcel = excelApp.Workbooks.Open("C:\Ashok\file.xlsx")
excelApp.Visible = True
End Sub
----------------------------
Please let me know how to check following.
- is the path behind the executable registered in Windows registry to the Excel.Application object correct?
Excel.Application is not working from DOORS dxl script.
I suspect a script which I ran earlier. After that Excel.Application is not working. Script deals with oleObjects. I guess it opened oleExcel objects.
Here is that script.
--------------------------------------------------------
string s = "/Training Car Project/System requirements"
Module m = read(s, false)
OleAutoObj wbs
OleAutoObj wb
OleAutoObj ws
OleAutoObj objCell
OleAutoArgs args = create// create an excel
OleAutoObj ex = oleCreateAutoObject "Excel.Application"
oleGet (ex, "Workbooks", wbs) // get workbooks handle
oleMethod (wbs, "Add", args, wb)// add a workbook
olePut(ex, "Visible", true)// make excel visible
put(args, 1)// Get first worksheet
oleGet (ex, "Worksheets", args, ws) // your code now
Object o
int i = 1
int j = 3
for o in m do
{
if (oleIsObject (o))
{
oleActivate(o)
i = i + 20
string s = richTextWithOle (o."Object Text")
RichText rtf
for rtf in s do
{
if (rtf.isOle)
{
print o."Absolute Number""\n"
EmbeddedOleObject ole = rtf.getEmbeddedOle
oleCopy (ole)
clear args
put (args, i)
put (args, j)
oleGet (ws, "Cells", args, objCell) // select cell
clear args
put (args, objCell)
oleMethod (objCell, "Select")
clear args
//put (args, objCell) // does not work either
put (args, "Destination", objCell)
print oleMethod (ws, "Paste",args) } }}
}
--------------------------------------------------------
-Ashok Anumula
#Sustainability#DOORS#Support#SupportMigration#EngineeringRequirementsManagement