Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ExportEx not working

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!

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

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:

2.PNG


Output:

Capture.PNG


Seems you have opened wrong attachment. Herewith, I have attached the updated one.


View solution in original post

14 Replies
tamilarasu
Champion
Champion

Miguel,

Try,

set chart_kpi5_1 = ActiveDocument.GetSheetObject("CH368")

chart_kpi5_1.ExportEx "C:\Folder1\test.xls" , 5

Not applicable
Author

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!

tamilarasu
Champion
Champion

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.

Not applicable
Author

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!

tamilarasu
Champion
Champion

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

Not applicable
Author

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!

marcus_sommer

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

Not applicable
Author

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!

tamilarasu
Champion
Champion

Relative path is working fine. I have attached sample application.