I have a sheet with figures about performance of a person that contains a graph object as well.
I run this report with NL(Sheets) so I end up with one sheet per person, each sheet with its own graph object.
So far, so good.
Now comes the tricky part: every graph object in Excel has a name, default 'Graph 1' for the first and so on.
NB! This is NOT the graph title, it is the graph object NAME.
But after the report is run, I have, let say, 10 sheets containing a graph object, and ALL are named 'Graph 1'
Excel seems OK with that, and I would be too, if it wasn't for the fact that I need to reference these graph objects in SharePoint.
A SharePoint website can display graphs from an Excel sheet when you use the object name.
So, I would like Jet to name the graph objects for me.
Can that even be done?
If not, can I at least get a unique name per graph object, per sheet?
Anyone?
rmw
Date
Votes
1 comment
-
Jet Reports Historic Posts Is the report run by the scheduler? If not, you could try renaming the chart objects by using VBA.
Perhaps something like this (not tested):
[size=85]Sub RenameCharts()
Dim ws As Worksheet
Dim cht As ChartObject
Dim shp As Object
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
Set cht = ActiveSheet.ChartObjects("Chart 1")
cht.Name = ws.Name
Next ws
End Sub[/size]
Please sign in to leave a comment.