Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am looking for a way to hide the "Send to Excel" & "Export..." in the properties of an object, when user Right Clicks on it.
Basic need is to contol the user not to export more than 600K rows of data. i can get that info using a macro or an Aggr on Dimensions on the chart.
so if the chart rows crosses that limit either i have to hide those menu options or popup an warning not to export.
Does any one have an Idea on how we can control these menu options?
Thanks
Phani
Hi Phani,
You can use something like this within a macro:
set mybox = ActiveDocument.GetSheetObject("CH01")
mbp = mybox.GetProperties
mbp.Layout.Frame.XLIcon = true
mybox.SetProperties mbp
That code lets you show or hide the "Send to Excel" icon of an object. I think that might help you.
Regards!
Thanks for your time.
Code you provided will work awesome to hide the XL icon on the title of the charts, that i already know from the API guide.
But i need to know a way to hide the options that are shown in below image.
I have attached the example QVW that i am trying to get this done.
Even if you hide the icon to Send to Excel, the user will still be able to right click and select 'Send to Excel' unless you disable the option in the Document Properties. One solution may be to just add in a warning message that the export is not advised.
If you don't like that option, maybe see about adding a macro to change the document properties to disable Exporting when your limit is surpassed and re-enable it when the user is back under the row limit. I haven't tried that before though so I don't know if that is easy or even possible. Somebody like swuehl or Gysbert Wassenaar would probably be able to tell you. See attached for example of first option. Note that I only used Count(Volume) to calculate rows since the sample data is so simplified; your equation would probably be a far more complex aggr() expression.
Thanks Rebecca.
That would be great to have a macro to set the document properties to disable Exporting when the limit is surpassed and re-enable it when the user is back under the row limit.
Dont know how to get to that part though.
Lets see if our master minds (swuehl or Gysbert Wassenaar) have a thought on this?
Regards,
Phani
Seems like the "Allow Export" under Document properties --> Security tab is a read only property...
Didn't found any macro to control that property.
Any one has idea about this?