Click here to Skip to main content
15,895,142 members
Home / Discussions / C#
   

C#

 
AnswerRe: AutoComplete Textbox Pin
Member 1052801510-Sep-15 23:23
Member 1052801510-Sep-15 23:23 
QuestionConditional RunTime code Pin
NJdotnetdev10-Sep-15 4:39
NJdotnetdev10-Sep-15 4:39 
AnswerRe: Conditional RunTime code Pin
Pete O'Hanlon10-Sep-15 5:02
mvePete O'Hanlon10-Sep-15 5:02 
AnswerRe: Conditional RunTime code Pin
OriginalGriff10-Sep-15 5:23
mveOriginalGriff10-Sep-15 5:23 
GeneralRe: Conditional RunTime code Pin
NJdotnetdev10-Sep-15 5:43
NJdotnetdev10-Sep-15 5:43 
GeneralRe: Conditional RunTime code Pin
OriginalGriff10-Sep-15 5:49
mveOriginalGriff10-Sep-15 5:49 
GeneralRe: Conditional RunTime code Pin
Eddy Vluggen11-Sep-15 10:56
professionalEddy Vluggen11-Sep-15 10:56 
GeneralRe: Conditional RunTime code Pin
David A. Gray11-Sep-15 11:26
David A. Gray11-Sep-15 11:26 
AnswerRe: Conditional RunTime code Pin
Eddy Vluggen10-Sep-15 5:41
professionalEddy Vluggen10-Sep-15 5:41 
GeneralRe: Conditional RunTime code Pin
NJdotnetdev10-Sep-15 5:45
NJdotnetdev10-Sep-15 5:45 
GeneralRe: Conditional RunTime code Pin
Eddy Vluggen10-Sep-15 5:54
professionalEddy Vluggen10-Sep-15 5:54 
QuestionNew to programming--Help! Pin
Member 119729959-Sep-15 20:13
Member 119729959-Sep-15 20:13 
AnswerRe: New to programming--Help! Pin
OriginalGriff9-Sep-15 21:09
mveOriginalGriff9-Sep-15 21:09 
AnswerRe: New to programming--Help! Pin
Richard MacCutchan9-Sep-15 22:10
mveRichard MacCutchan9-Sep-15 22:10 
AnswerRe: New to programming--Help! Pin
F-ES Sitecore9-Sep-15 23:42
professionalF-ES Sitecore9-Sep-15 23:42 
AnswerRe: New to programming--Help! Pin
Afzaal Ahmad Zeeshan10-Sep-15 1:06
professionalAfzaal Ahmad Zeeshan10-Sep-15 1:06 
AnswerRe: New to programming--Help! Pin
Amarnath S10-Sep-15 1:56
professionalAmarnath S10-Sep-15 1:56 
Questionmaking an array of List Pin
sdecorme9-Sep-15 3:53
sdecorme9-Sep-15 3:53 
AnswerRe: making an array of List Pin
OriginalGriff9-Sep-15 4:17
mveOriginalGriff9-Sep-15 4:17 
AnswerRe: making an array of List Pin
Eddy Vluggen9-Sep-15 11:24
professionalEddy Vluggen9-Sep-15 11:24 
QuestionSecondary Y-Axis not displayed in graph using c sharp Pin
santosh kumar dash9-Sep-15 2:10
santosh kumar dash9-Sep-15 2:10 
AnswerRe: Secondary Y-Axis not displayed in graph using c sharp Pin
Eddy Vluggen9-Sep-15 3:44
professionalEddy Vluggen9-Sep-15 3:44 
GeneralRe: Secondary Y-Axis not displayed in graph using c sharp Pin
santosh kumar dash10-Sep-15 0:16
santosh kumar dash10-Sep-15 0:16 
Hi Eddy,

I have pasted my code please have a look.

can we draw secondary y axis with the help of ChartWizard method in word chart.

Microsoft.Office.Interop.Word.Chart wdChart = wordDoc.InlineShapes.AddChart(Microsoft.Office.Core.XlChartType.xlLine, para17.Range).Chart;
wdChart.ChartWizard(Source: missing1,
Title: "graphTitle",
CategoryTitle: "Time",
ValueTitle: "Temperature",
ExtraTitle:"check");

Microsoft.Office.Interop.Word.ChartData chartData = wdChart.ChartData;

Microsoft.Office.Interop.Excel.Workbook dataWorkbook = (Microsoft.Office.Interop.Excel.Workbook)chartData.Workbook;
Microsoft.Office.Interop.Excel.Worksheet dataSheet = (Microsoft.Office.Interop.Excel.Worksheet)dataWorkbook.Worksheets[1];

Microsoft.Office.Interop.Excel.ChartObjects ChartObjects = (Microsoft.Office.Interop.Excel.ChartObjects)dataSheet.ChartObjects();
Microsoft.Office.Interop.Excel.ChartObject chartObject = ChartObjects.Add(40, 1000, 700, 350);

Microsoft.Office.Interop.Excel.SeriesCollection seriesCollection = (Microsoft.Office.Interop.Excel.SeriesCollection)chartObject.Chart.SeriesCollection();

Microsoft.Office.Interop.Excel.Series series1 = seriesCollection.NewSeries();
series1.XValues = dataSheet.get_Range("A1", "B7");
series1.AxisGroup = Microsoft.Office.Interop.Excel.XlAxisGroup.xlSecondary;

Microsoft.Office.Interop.Excel.Series series3 = seriesCollection.NewSeries();
series3.XValues = dataSheet.get_Range("A1", "D7");
Microsoft.Office.Interop.Excel.Series series4 = seriesCollection.NewSeries();
series4.XValues = dataSheet.get_Range("A1", "E7");


((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("A2", missing1)).FormulaR1C1 = "5";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("A3", missing1)).FormulaR1C1 = "10";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("A4", missing1)).FormulaR1C1 = "15";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("A5", missing1)).FormulaR1C1 = "20";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("A6", missing1)).FormulaR1C1 = "25";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("A7", missing1)).FormulaR1C1 = "30";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("B2", missing1)).FormulaR1C1 = "1000";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("B3", missing1)).FormulaR1C1 = "2500";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("B4", missing1)).FormulaR1C1 = "4000";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("B5", missing1)).FormulaR1C1 = "3000";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("B6", missing1)).FormulaR1C1 = "400";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("B7", missing1)).FormulaR1C1 = "300";

((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("C2", missing1)).FormulaR1C1 = "700";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("C3", missing1)).FormulaR1C1 = "500";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("C4", missing1)).FormulaR1C1 = "400";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("C5", missing1)).FormulaR1C1 = "300";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("C6", missing1)).FormulaR1C1 = "2500";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("C7", missing1)).FormulaR1C1 = "3500";


((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("D2", missing1)).FormulaR1C1 = "1100";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("D3", missing1)).FormulaR1C1 = "2150";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("D4", missing1)).FormulaR1C1 = "4100";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("D5", missing1)).FormulaR1C1 = "3100";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("D6", missing1)).FormulaR1C1 = "2100";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("D7", missing1)).FormulaR1C1 = "3100";

((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("E2", missing1)).FormulaR1C1 = "2100";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("E3", missing1)).FormulaR1C1 = "2050";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("E4", missing1)).FormulaR1C1 = "4000";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("E5", missing1)).FormulaR1C1 = "2100";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("E6", missing1)).FormulaR1C1 = "4000";
((Microsoft.Office.Interop.Excel.Range)dataSheet.Cells.get_Range("E7", missing1)).FormulaR1C1 = "2100";

wdChart.ApplyDataLabels(Microsoft.Office.Interop.Word.XlDataLabelsType.xlDataLabelsShowLabel, missing1, missing1, missing1, missing1, missing1, missing1, missing1, missing1, missing1);
dataWorkbook.Application.Quit();

Regards,
Santosh.
Questioncalling T's method from a generic class Pin
binsafir7-Sep-15 23:36
binsafir7-Sep-15 23:36 
AnswerRe: calling T's method from a generic class Pin
Eddy Vluggen7-Sep-15 23:57
professionalEddy Vluggen7-Sep-15 23:57 

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.