Qlik Community

QlikView Integration

Discussion Board for collaboration on QlikView Integration.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Re: ExportEx not working

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.


14 Replies

Re: ExportEx not working

Miguel,

Try,

set chart_kpi5_1 = ActiveDocument.GetSheetObject("CH368")

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

Not applicable

Re: ExportEx not working

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!

Re: ExportEx not working

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

Re: ExportEx not working

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!

Re: ExportEx not working

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

Re: ExportEx not working

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!

Re: ExportEx not working

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

Re: ExportEx not working

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!

Re: ExportEx not working

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

Community Browser