Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
When you print or export to a pdf, the current selections are shown too. When I export to excel, the current selections are not shown. Can we, and if so how, can we export to excel with the current selections attached too?
Thanks!
in the code you need to change the "CH252" to the object ID for the chart you want to export
in the code you need to change the "CS12" to the object ID for the selection box you want to export
Well there is a fix on the support site for AJAX, but it breaks the export selections in IE explorer plugin for us (which was working).
Description |
| |
Resolution |
| |
Tags | Server/Publisher, AJAX, Export, Excel, Current Selections |
This can be done with a macro:
sub ExportWithSelections
Set XLApp = CreateObject("Excel.Application")
XLApp.Visible = True
Set XLWorkbook = XLApp.Workbooks.Add
Set XLSheet = XLWorkbook.sheets("Sheet1")
XLSheet.Range("A3").Select
rem ** copy full chart details to clipboard **
ActiveDocument.GetSheetObject("CH252").CopyTableToClipboard false
XLSheet.Paste ' -4163 'values
XLSheet.Range("J2").Select
rem ** put current selection in J2 **
ActiveDocument.GetSheetObject("CS12").CopyTableToClipboard true
XLSheet.Paste ' -4163 'values
XLApp.Selection.WrapText = False
set XLSheet = nothing
set XLWorkbook = nothing
set XLApp = nothing
end sub
The only thing is where do I put this macro? If someone is opening the QV document through a web portal, will they beable to use this macro? Can I incorporate it with the QV document so that it will append the selections no matter the version of excell someone open into?
Tools|Edit Module opens the macro editor.
This macro requires System Access.
It will work if your users are opening with the IEPlugin. I don't know if it will work with Ajax.
Once the macro is entered. You need to create a button object and set the button acrtion to run the macro.
Sorry mwoolf. I've not made a macro in QV before. When I add it and create a button and set the action of the button to Run Macro with the name of the macro I created, it only opens the edit module window with the macro code.
What am I missing?
in the code you need to change the "CH252" to the object ID for the chart you want to export
in the code you need to change the "CS12" to the object ID for the selection box you want to export
Thanks mwoolf. That does work, but what I really want is just when people right click on any chart and choose to export in excel, that it will export with selections.
I know these options exist under document properties. But it doesn't work when I try to download a chart from a dashboard in production.
Hi Brandon,
Did you try the following on the prod server? : User preferences-Exports-Selection Stamps in Exports- On BIFF exports- checked
We're still using 10.4, so we don't have Selections Stamps but rather Selections for Current selection box. Clicking those two boxes doesn't work with the production server when you right-click and export to excel though at least not for "Open with AJAX zero footprint" or when you do it with a different browser (It does work with IE plugin.)
Did you ever come up with a solution to this? I'm wondering the same thing if I can get the selections to appear when sending a table box of data to Excel.