Solved

Excel Chart and Graph Data

Posted on 2012-03-21
2
445 Views
Last Modified: 2012-03-26
Is it possible to base a chart or graph in Excel off of a SQL Server table and/or SQL Server Procedure?

My boss would like the data NOT to be embedded in a sheet within the document.  I have already offered the common tricks like hiding the sheet, hiding the data, etc.  He basically wants to use some complicated graphs that have already been created, but point them to a different data source.

Thank you
0
Comment
Question by:WEhalt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 42

Accepted Solution

by:
dlmille earned 200 total points
ID: 37751147
Excel charts inherently have a SourceData property that must be an Excel range, so "normal" charts require the data to be in the spreadsheet.

I had thought one could create a PivotChart directly from an existing connection, but when I attempted this, it always ended up creating a pivot table of the data, first, which appears to be a non-starter.

You MAY be able to go straight from SQL database table/view to dashboard report/chart using:  PerformancePoint Dashboard Designer or other 3rd party dashboard design software (google dashboard designer).

http://office.microsoft.com/en-us/performancepoint-server/create-a-pivotchart-report-by-using-performancepoint-dashboard-designer-HA010252496.aspx#BM2

Or, if you want to stick with Excel, you could put some VBA together to create a non-visible instance of the data from SQLServer, create the chart, then export that chart to a jpg or other related format, then pull that file up which is just the picture output.  In this instance, the data while pulled into Excel is never seen nor kept in Excel and the hidden process's job is to generate a picture of the chart.

One other less dynamic approach follows a method I used about 20 years ago that is similar.  Generate in a central place all the charts that might be needed, taking snapshots of the charts that you want to distribute via your "Executive Dashboard/Management System".  In this way, no users have access to the data, only the output.  You can generate all this with VBA, and even push the output to a powerpoint file if you wish, or to tabs in an Excel spreadsheet with some type of menu supporting navigation from/to charts.

If you find either of these two last options attractive, I can assist.  They do meet the requirement of the data not being embedded with the charts.

Good luck!

Dave
0
 

Author Closing Comment

by:WEhalt
ID: 37765536
Thank you that answer was superb!  I will share the information with my supervisor and ask I new question if he wants me to pursue this.

Thanks again.
W
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question