Click here to Skip to main content
15,879,326 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez4-May-06 7:29
Elvia Gonzalez4-May-06 7:29 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez4-May-06 8:13
Elvia Gonzalez4-May-06 8:13 
GeneralRe: How can I set a value in a cell of the DataGridView that contains a DataGridViewComboBoxColumn? Pin
Elvia Gonzalez4-May-06 14:31
Elvia Gonzalez4-May-06 14:31 
QuestionHow to pass form reference at run time. Pin
abhinish3-May-06 9:32
abhinish3-May-06 9:32 
AnswerRe: changing datagridview cell Pin
Office Lineman3-May-06 12:27
Office Lineman3-May-06 12:27 
QuestionCustom Tooltips Pin
siongc3-May-06 9:15
siongc3-May-06 9:15 
AnswerRe: Custom Tooltips Pin
Ravi Bhavnani3-May-06 9:45
professionalRavi Bhavnani3-May-06 9:45 
Questionautomation of excel chart generation Pin
Gollaprolu3-May-06 8:57
Gollaprolu3-May-06 8:57 
Hi all,

Can anybody help for my requirement ? . I will appreciate that. My requirement is as follows.

1. I have a data in excel sheet . The example data what I have is like this

2004 Sales 2005 Sales 2006 Sales 2007 Sales
1 1 5 2
2 20 10 4
3 30 15 6
4 40 20 8
5 50 25 10
6 60 30 12
7 70 35 14
8 80 40 16
9 90 45 18

I wanted to generate the charts for the columns 2004sales and 2005 sales seperately and 2004 sales and 2006 sales and 2004 sales and 2007 sales .

All the charts I need to generate seperately . and put them on excel sheet .I wanted to use C# code . The code what I have is as follows.

object missing = System.Reflection.Missing.Value;
Excel.Workbook workBookObject = null;
Excel.Range oResizeRange = null;
Excel.Worksheet excelWorkSheet = null;
Excel.Worksheets excelSheets = null;
Excel.Application excelApp = null;

excelApp.Visible = true;

string workbookPath = "D:/osxpasql12.xls";

workBookObject = excelApp.Workbooks.Open(workbookPath,

0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "",

true, false, 0, true, false, false);

//excelSheets = excelWorkbook.Worksheets;

//excelWorksheet = (Excel.Worksheet)excelSheets.get_Item("osxpasql12");

Excel.Chart xlChart = (Excel.Chart)workBookObject.Charts.Add(missing, missing, missing, missing);

xlChart.ChartType = Excel.XlChartType.xlLineMarkers;

Excel._Chart oChart = (Excel._Chart)workBookObject.Charts.Add(missing,missing,missing,missing);

//Excel._Chart oChart = (Excel._Chart)workBookObject.Charts.Add( missing, missing, missing, missing );

oChart.ChartWizard( oResizeRange, Excel.XlChartType.xl3DColumn, missing, Excel.XlRowCol.xlColumns, missing, missing, missing, missing, missing, missing, missing );


---------------------------------------------------------------------------------------------------------

with the above code its taking the range . I need a solution where we can read individual columns and generate charts individually.

Any solutions please help me.

Thanks in advance .. Aparna


Aparna
QuestionNeed help sending SOAP message with byte array in message Pin
jdrage3-May-06 8:44
jdrage3-May-06 8:44 
Questionconverting numbers to date Pin
TheJudeDude3-May-06 8:43
TheJudeDude3-May-06 8:43 
AnswerRe: converting numbers to date Pin
Ravi Bhavnani3-May-06 9:01
professionalRavi Bhavnani3-May-06 9:01 
GeneralRe: converting numbers to date Pin
TheJudeDude3-May-06 9:16
TheJudeDude3-May-06 9:16 
GeneralRe: converting numbers to date Pin
Ravi Bhavnani3-May-06 9:20
professionalRavi Bhavnani3-May-06 9:20 
GeneralRe: converting numbers to date Pin
TheJudeDude3-May-06 9:25
TheJudeDude3-May-06 9:25 
GeneralRe: converting numbers to date Pin
J4amieC3-May-06 22:10
J4amieC3-May-06 22:10 
QuestionCopy DBF file to MDB Pin
Bedevian3-May-06 8:18
Bedevian3-May-06 8:18 
QuestionProblem with Reports Pin
ventomito3-May-06 8:11
ventomito3-May-06 8:11 
AnswerRe: Problem with Reports Pin
ranandbe4-May-06 20:19
ranandbe4-May-06 20:19 
QuestionTotal Physical Memory Pin
rajith_r3-May-06 7:54
rajith_r3-May-06 7:54 
AnswerRe: Total Physical Memory Pin
Ravi Bhavnani3-May-06 8:45
professionalRavi Bhavnani3-May-06 8:45 
QuestionListView Control - Insert Method Pin
xfitr23-May-06 7:36
xfitr23-May-06 7:36 
AnswerRe: ListView Control - Insert Method Pin
Travis D. Mathison3-May-06 8:13
Travis D. Mathison3-May-06 8:13 
GeneralRe: ListView Control - Insert Method Pin
xfitr23-May-06 8:36
xfitr23-May-06 8:36 
GeneralRe: ListView Control - Insert Method Pin
Travis D. Mathison3-May-06 11:54
Travis D. Mathison3-May-06 11:54 
AnswerRe: ListView Control - Insert Method Pin
xfitr24-May-06 2:27
xfitr24-May-06 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.