Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Interesting scenarios

Hi,

I need the following scenarios , can any one pls suggest


11 Replies
Anonymous
Not applicable
Author

suggestions required

Not applicable
Author

Hello John,

What suggestions are you looking for? Macro to export to ppt or on the visualization of the options you have mentioned in the qvw?

Thanks,

Shruthi Reddy

Anonymous
Not applicable
Author

Thanks for responding Sruthi,

I have mentioned in the dashboard regarding the export to PPT with some scenarios.

could you go through the app and suggest me

Not applicable
Author

so basically you need a macro to export to ppt with different options as mentioned.

is that right?

Anonymous
Not applicable
Author

Yes,

Exactly

if you could help me out provide me the sample application(QVW) with the above mentioned options

Not applicable
Author

Hi John,

use the following macro. in your sample qvw for each button, you can have a macro attached, you can customise the below macro with required chart ID's.

Set  objPPT = CreateObject("PowerPoint.Application")

dim PPSlide

'------------------Export to PPT ----------------

Function copy_to_ppt(Left_pos , Top_pos, width,height )

On Error Resume Next

'set PPSlide = activesheets.Slides

        PPSlide.Shapes.Paste

        PPSlide.Shapes(PPSlide.Shapes.count).Left = Left_pos

      PPSlide.Shapes(PPSlide.Shapes.count).Top = Top_pos

      PPSlide.Shapes(PPSlide.Shapes.count).width = width

      PPSlide.Shapes(PPSlide.Shapes.count).Height = height

End Function

sub ExportPPT()

set PPPres = objPPT.Presentations.Open("C:\Users\anjaneya\Downloads\HP_PPT_Standard_16x9_EN.potx")

if ActiveDocument.Sheets("Platform Cost Comparison").isactive then       

  set PPSlide = PPPres.Slides.Add(1, 1)

  PPSlide.Shapes(1).Delete ' removes the title

  PPSlide.Shapes(1).Delete ' removes the text box   ' Header & Legend

  ActiveDocument.GetSheetObject("TX68").CopyBitmapToClipboard

  copy_to_ppt  0,15,30,20

  ActiveDocument.GetSheetObject("TX67").CopyBitmapToClipboard

  copy_to_ppt  30,15,200,30

  ActiveDocument.GetSheetObject("TX124").CopyBitmapToClipboard

  copy_to_ppt  30,45,200,20

  'Charts

  ActiveDocument.GetSheetObject("TX185").CopyBitmapToClipboard

        ActiveDocument.GetSheetObject("CH45").CopyBitmapToClipboard

  copy_to_ppt  0,70,50,300

      ActiveDocument.GetSheetObject("TX185").CopyBitmapToClipboard

      ActiveDocument.GetSheetObject("CH46").CopyBitmapToClipboard

  copy_to_ppt  150,70,40,300

end if

Set PPSlide = Nothing

Set PPPres = Nothing

Msgbox("Export Finished")

end sub

Anonymous
Not applicable
Author

Thanks Shruthi

can you share the QVW file so that it would be more clear

Anonymous
Not applicable
Author

hi,

if ActiveDocument.Sheets("Platform Cost Comparison").isactive then       

with this statement we can only export from single sheet only right?

what if we need the export from different sheets ?

Not applicable
Author

with this m just checking whether the sheet is active or not.

If you have export button in first sheet then you cna use the below.

ActiveDocument.Sheets("SH01").Activate

.......select all the charts required

you can move to next sheet by using

ActiveDocument.Sheets("SH02").Activate or ActiveDocument.NextTab

...select all the charts required