Click here to Skip to main content
15,914,255 members
Home / Discussions / C#
   

C#

 
AnswerRe: Get/Set for List in C# Pin
Luc Pattyn21-May-09 3:36
sitebuilderLuc Pattyn21-May-09 3:36 
GeneralRe: Get/Set for List in C# Pin
musefan21-May-09 3:45
musefan21-May-09 3:45 
GeneralRe: Get/Set for List in C# Pin
PIEBALDconsult21-May-09 4:09
mvePIEBALDconsult21-May-09 4:09 
GeneralRe: Get/Set for List in C# Pin
Luc Pattyn21-May-09 4:21
sitebuilderLuc Pattyn21-May-09 4:21 
GeneralRe: Get/Set for List in C# Pin
musefan21-May-09 4:37
musefan21-May-09 4:37 
GeneralRe: Get/Set for List in C# Pin
Paddy Boyd21-May-09 5:24
Paddy Boyd21-May-09 5:24 
GeneralRe: Get/Set for List in C# Pin
Luc Pattyn21-May-09 5:30
sitebuilderLuc Pattyn21-May-09 5:30 
Questionexcel x-axis in Time format 00:00:00 using C# Pin
carnister21-May-09 2:49
carnister21-May-09 2:49 
hi, i am doing a program to plot time vs speed in excel file. but right now i have some problems into doing so. i am unable to convert the x-axis into time format.. below is the code i have written.... please help by giving examples... thanks lots!!

while (((Microsoft.Office.Interop.Excel.Range)oldsheet.Cells[row, column]).Value2 != null)
{
string splitcell = ((Microsoft.Office.Interop.Excel.Range)oldsheet.Cells[row, column]).Value2.ToString();

split = splitcell.Split(',');

int.TryParse(split[0], out hour);
int.TryParse(split[1], out min);
int.TryParse(split[2], out sec);
int.TryParse(split[21], out rpm);

time = new DateTime(1, 1, 1, hour, min, sec);

newsheet1.Cells[row, column] = time.ToString("HH:mm:ss");
newsheet1.Cells[row, column + 1] = rpm;

row++;
}
row--;

range = newsheet1.get_Range("A2", "B" + row.ToString());
xlChart.Legend.Clear();

Microsoft.Office.Interop.Excel.Axis x = (Microsoft.Office.Interop.Excel.Axis)xlChart.Axes(Microsoft.Office.Interop.Excel.XlAxisType.xlCategory, Microsoft.Office.Interop.Excel.XlAxisGroup.xlPrimary);
x.CategoryType = Microsoft.Office.Interop.Excel.XlCategoryType.xlTimeScale;
x.BaseUnit = Microsoft.Office.Interop.Excel.XlTimeUnit.xlDays;
//x.MajorUnitScale = Microsoft.Office.Interop.Excel.XlTimeUnit.xlDays;
//x.MajorUnit = 0.0208333333;
x.HasTitle = true;
x.AxisTitle.Text = "Time";

Microsoft.Office.Interop.Excel.Axis y = (Microsoft.Office.Interop.Excel.Axis)xlChart.Axes(Microsoft.Office.Interop.Excel.XlAxisType.xlValue, Microsoft.Office.Interop.Excel.XlAxisGroup.xlPrimary);
y.HasTitle = true;
y.AxisTitle.Text = "Speed";

xlChart.ChartType = Microsoft.Office.Interop.Excel.XlChartType.xlXYScatterSmoothNoMarkers;
xlChart.SetSourceData(range, Type.Missing);

series = (Microsoft.Office.Interop.Excel.Series)xlChart.SeriesCollection(1);
series.Format.Line.Weight = (float)0.25;
QuestionSave to default program files folder Pin
Jon Henry21-May-09 2:30
Jon Henry21-May-09 2:30 
AnswerRe: Save to default program files folder Pin
musefan21-May-09 2:35
musefan21-May-09 2:35 
AnswerRe: Save to default program files folder [modified] Pin
Luc Pattyn21-May-09 3:41
sitebuilderLuc Pattyn21-May-09 3:41 
GeneralRe: Save to default program files folder Pin
Jon Henry21-May-09 13:00
Jon Henry21-May-09 13:00 
GeneralRe: Save to default program files folder Pin
Luc Pattyn21-May-09 13:35
sitebuilderLuc Pattyn21-May-09 13:35 
QuestionCurious question as I am c# developer. [modified] Pin
Blubbo21-May-09 2:23
Blubbo21-May-09 2:23 
AnswerRe: Curious question as I am c# developer. Pin
musefan21-May-09 2:33
musefan21-May-09 2:33 
AnswerRe: Curious question as I am c# developer. Pin
EliottA21-May-09 3:01
EliottA21-May-09 3:01 
JokeRe: Curious question as I am c# developer. Pin
Manas Bhardwaj21-May-09 4:02
professionalManas Bhardwaj21-May-09 4:02 
GeneralRe: Curious question as I am c# developer. Pin
PIEBALDconsult21-May-09 5:20
mvePIEBALDconsult21-May-09 5:20 
QuestionUsing UserFields and Date Fields in Web Parts Pin
lday8621-May-09 2:22
lday8621-May-09 2:22 
QuestionCombining default xml serialization and custom xml serialization. Pin
rahulvb2821-May-09 2:03
rahulvb2821-May-09 2:03 
QuestionCrysatal Report Problem Pin
Mogaambo21-May-09 1:48
Mogaambo21-May-09 1:48 
QuestionRegion based shape representation Pin
raouaa21-May-09 1:15
raouaa21-May-09 1:15 
AnswerRe: Region based shape representation Pin
Henry Minute21-May-09 1:50
Henry Minute21-May-09 1:50 
QuestionReturning Field Names in SharePoint Pin
lday8621-May-09 1:04
lday8621-May-09 1:04 
GeneralGantt chart control Pin
hairy_hats21-May-09 0:48
hairy_hats21-May-09 0:48 

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.