public class Form2
{
public Excel.Application Excelobj =new Excel.Application ();
public Excel.Workbook workbook = null;
public Excel.Range currentCell = null;
public Excel.Worksheet worksheet = null;
public Excel.Sheets excelSheets = null;
public Excel.Range range1 = null;
public Form3 a= new Form3();
public void CreateChart()
{
Excel.Worksheet thisWorksheet;
thisWorksheet = workbook.ActiveSheet as Excel.Worksheet;
Excel.ChartObjects charts =
(Excel.ChartObjects)thisWorksheet.ChartObjects(Type.Missing);
// Adds a chart at x = 100, y = 300, 500 points
wide and 300 tall.
Excel.ChartObject chartObj = charts.Add(100,
300, 500, 300);
Excel.Chart chart = chartObj.Chart;
// Gets the cells that define the bounds of the
data to be charted.
Excel.Range chartRange =
thisWorksheet.get_Range("A1","B3");
chart.SetSourceData(chartRange,Type.Missing);
chart.ChartType = Excel.XlChartType.xlPie;
Excel.SeriesCollection seriesCollection=
(Excel.SeriesCollection)chart.SeriesCollection(Type.Missing);
Excel.Series series =
seriesCollection.Item(seriesCollection.Count);
//a.b=charts.CopyPicture(Excel.XlPictureAppearance.xlScreen,Excel.XlCopyPictureFormat.xlBitmap);
//Errors
}
}
this is the code
it has errors
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Microsofts_C_Sharp/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/