Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am having an issue with Export Ex when I try to export a Graph to .xls This is the code I am using:
set chart_kpi5_1 = .doc.GetSheetObject("CH368")
chart_kpi5_1.ExportEx"C:\Folder1\test.xls",5
The problem is that when I go to that folder it has not created anything!
Does anyone had the same problem?
Thank you!
Miguel,
First of all, no need to say thanks and all. I am just sharing with you what I knew. If you could post your issues clearly, you might get answers quickly (almost four days in your case).
Now coming to your issue. Change below line .
chart.CopyBitmapToClipboard
chart.CopyTableToClipboard True
Actual Chart:
Output:
Seems you have opened wrong attachment. Herewith, I have attached the updated one.
Miguel,
Try,
set chart_kpi5_1 = ActiveDocument.GetSheetObject("CH368")
chart_kpi5_1.ExportEx "C:\Folder1\test.xls" , 5
Hi Tamil,
First of all thank you. But it still does not work as I am using a .vbs script... Any other idea?
Thank you very much again!
Miguel, The above one is working fine. Could you post your full script and explain us what you are trying to do.? So that we can check and provide a solution.
Hi Tamil,
This is my code:
Sub includeFile(ByVal fSpec)
executeGlobal CreateObject("Scripting.FileSystemObject").openTextFile(fSpec).readAll()
End Sub
includeFile "QvUtils.vbs"
with New QlikView
.open("..\..\QVW\Sales\Field Performance.qvw")
set chart_kpi5_2 = ActiveDocument.GetSheetObject("CH356")
When I do this I get: Object required: ActiveDocument
Thank you again!
Miguel,
Try,
Sub includeFile(ByVal fSpec)
executeGlobal CreateObject("Scripting.FileSystemObject").openTextFile(fSpec).readAll()
End Sub
includeFile "QvUtils.vbs"
with New QlikView
.open("..\..\QVW\Sales\Field Performance.qvw")
set chart = .doc.GetSheetObject("TB03")
chart.ExportBiff("C:\Folder1\test.xls")
.doc.CloseDoc
.Quit
end with
Hi Tamil,
Thank you very much again. The problem is that the object I am trying to export is a Graph and Graphs do not suppor ExportBiff... That is why I am trying with ExportEx...
Thank you again!
with New QlikView
.open("..\..\QVW\Sales\Field Performance.qvw")
isn't a valid statement to open another qvw - see here an example from the APIGuide.qvw (is in your install-folder by automation):
rem ** VBScript **
set App = ActiveDocument.GetApplication
set newdoc = App.OpenDoc ("C:\MyDocuments\QV4Automation.qvw","","")
set App = ActiveDocument.GetApplication
App.OpenDoc "C:\MyDocuments\Budget.qvw","JNN","123456"
rem ** Visual Basic **
dim App as New QlikView.Application
set newdoc = App.OpenDoc ("C:\MyDocuments\Budget.qvw","JN","123456")
and I'm not sure if relative paths are working here.
- Marcus
I am not having issues opening the app furthermore I am able to export many other objects but when I try to export a Graph is when I am having that issue...
Thank you for your response!
Relative path is working fine. I have attached sample application.