Wrox Programmer Forums
|
Book: Wrox's Visual C# 2005 Express Edition Starter Kit
This is the forum to discuss the Wrox book Wrox's Visual C# 2005 Express Edition Starter Kit by F. Scott Barker; ISBN: 9780764589553
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Book: Wrox's Visual C# 2005 Express Edition Starter Kit section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 13th, 2009, 02:17 AM
Registered User
 
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Charting in power point using C#

hi,
Can we export "Microsoft .net Chart Component" in Power point?

I have written a sample code using Microsoft .net Chart Component and i want to export it in power point without saving it as a jpg file. how to achieve it?

private void load_chart()
{
// The Access database
string fileNameString = "C:\\Amitabh Per\\C#\\Chart_Win Samples\\data\\ExcelData.xls";
// Initialize a connection string
//string fileNameString = "data\\ExcelData.xls";
// Create connection object by using the preceding connection string.
string sConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
fileNameString +
";Extended Properties=\"Excel 8.0;HDR=YES\"";
OleDbConnection myConnection = newOleDbConnection( sConn );
myConnection.Open();
// The code to follow uses a SQL SELECT command to display the data from the worksheet.
// Create new OleDbCommand to return data from worksheet.
OleDbCommand myCommand = newOleDbCommand( "Select * From [data1$A1:E25]", myConnection );
// create a database reader
OleDbDataReader myReader = myCommand.ExecuteReader (CommandBehavior.CloseConnection);
// Populate the chart with data in the file

chart1.DataBindTable(myReader,
"HOUR");
// close the reader and the connection
myReader.Close();
myConnection.Close();
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing power point template from c# code Anypond General .NET 0 January 19th, 2008 06:56 AM
Insert Table using office interop Power Point yuenli C# 2005 0 September 2nd, 2007 04:55 AM
how to export .asp page to power point slide star12345 General .NET 2 August 24th, 2007 12:04 AM
Automate vba snap shot report to power point learnvb Access VBA 3 January 6th, 2004 07:06 PM
Chart in power point Using VBA Bhavna Agrawal Excel VBA 1 July 11th, 2003 07:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.