Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tripatirao
Creator II
Creator II

Need Help in qlikview macro to send qlikview chart as image

Dear all,

I need help with macro code that will save my qlikview charts as image by looping a field value.

I have attached  my source code  and qlikview file.

I have explained my requirement in textbox Please check. and help me.

Regards

Tripati

1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

Please see the attached or the solution and hope this helps..

View solution in original post

6 Replies
trdandamudi
Master II
Master II

Please see the attached or the solution and hope this helps..

tripatirao
Creator II
Creator II
Author

Dear Thirumala,

Thanks for your Reply.

The above macro is working for the charts which does not have calculated condition.

In my real application I have calculated condition.

I have to select Fiscal_Year,FiscalMonth_Name,Region to show value on the chart.

I have attached the charts for your reference please check.

Fiscal_Year Value like 2011,2012,2013,2014..........

FiscalMonth_Name  value like Jan,Feb,Mar............


FUNCTION ExportObjectToPNG(ObjID, fName)

  ActiveDocument.GetSheetObject(ObjID).ExportBitmapToFile fName

END FUNCTION

SUB ExportChartByRegionListboxValues

  DIM fname, value, filePath, timestamp

  SET Doc = ActiveDocument

  Doc.Fields("Fiscal_Year").Select Doc.Evaluate("max(Fiscal_Year)")

  Doc.Fields("FiscalMonth").Select Doc.Evaluate("max(FiscalMonth)")

  FieldName = "Region"

  SET Field = Doc.Fields(FieldName).GetPossibleValues

  FOR index = 0 to Field.Count-1

  Doc.Fields(FieldName).Clear

  Doc.Fields(FieldName).SELECT Field.Item(index).Text

  fileName = Field.Item(index).Text & ".png"

  ExportObjectToPNG "CH171", "E:\BSC_Test\Excel\" & fileName

  NEXT

  Doc.Fields(FieldName).Clear

END SUB

trdandamudi
Master II
Master II

If you have calculated conditon, then you need to select the conditions that you need and then click on the "Export" button. But for this to work, you should not loop thru the list box values in the macro. Hope this helps,,,

tripatirao
Creator II
Creator II
Author

Hi Thirumala,

Macro is working fine now for me.

Now my requirement is how to send these image into single ppt slide by using macro

Regards

Tripati

tripatirao
Creator II
Creator II
Author

Hi Thirumala,

Can you help me with the code.

Regards

Tripati

trdandamudi
Master II
Master II

Sorry, was not able to login into the community as I was busy with work.. I think the below link will get you what you are looking for. Hope this helps,,,

Automated PowerPoint Presentation Extraction