Yes, this is possible although in this example the excel report would not be stored in QC but generated on clicking the button, the user that is accessing the report would still need the QC connectivity add in installed and would need to have the client registered. Using the sample code below I was able to create an HTML button that launches excel and executes VBA that connects to Quality Center using the OTA API. For this example for tests that were run overnight we combined the date and time so that overnight runs could be filtered more precisely, I used code from these two sources in this example:
Note: You will need to change the first few lines to reference your QC instance, Domain, Project, login, etc. Also you will need to enable certain active x controls in IE to allow the button to launch Excel.
Save the following as an html in notepad:
sub button1_onclick()
' Launch Excel
dim app
set app = createobject(''Excel.Application'')
' Make it visible
app.Visible = true
' Add a new workbook
dim wb
set wb = app.workbooks.add
Dim tdc
Set tdc = CreateObject(''TDApiOle80.TDConnection'')
MsgBox (''Connect to QC Server'')
@JTaylor and @Josh_Yates,
I totally know its over 5 yrs now.
I was looking for a similar method. So I tested your above code in Excel macro. But, ended with an error. Error is ''Failed to run Query:. Its failing at line 'Execute the query and store in the SQLResults resultset.
Set SQLResults = oCommand.Execute.
Can you please investigate and let me know where is an issue?
Note: My DB instance is Oracle and ALM v11.00