1. I have a DateTime X Axis which displays correctly in runtime, but when I look at the exported Excel file find that DateTime values has become Doubles. Is there a way to prevent this?
2. I name my DataSeries using the Title propery and I set the IncludeHeader property to true before exporting in Excel format. I can't, anyway see in the excel file the series title. Is there a way to show them in the excel file?
Exporting Chart's Data in Excel Format.
-
- Newbie
- Posts: 2
- Joined: Mon Feb 02, 2004 5:00 am
Hi,
( copy from our newsgroups : post by Christopher)
-----------------------------------------------------------
Hi Alessandro,
Steema.TeeChart.Export.DataExportFormat.IncludeHeader Property Include the Series valuelist name with exported data
An example of this would be:
( copy from our newsgroups : post by Christopher)
-----------------------------------------------------------
Hi Alessandro,
This is because the Excel cells are all in "General" format. You can change this in Excel by right clicking over the cells containing the double DateTime values and selecting the Date, Time or Custom formats.1. I have a DateTime X Axis which displays correctly in runtime, but when I look at the exported Excel file find that DateTime values has become Doubles. Is there a way to prevent this?
In the TeeChart for .NET Help file it says:2. I name my DataSeries using the Title propery and I set the includeHeader property to true before exporting in Excel format. I can't, anyway see in the excel file the series title. Is there a way to show them in the excel file?
Steema.TeeChart.Export.DataExportFormat.IncludeHeader Property Include the Series valuelist name with exported data
An example of this would be:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e) {
tChart1.Aspect.View3D = false;
Random rnd = new Random();
DateTime dateTime = DateTime.Now;
char c = new char();
for(int i=0;i<10;++i) {
c = (char)(i + 65);
bar1.Add(dateTime, rnd.Next(100),c.ToString(),Color.Red);
dateTime = dateTime.AddSeconds(15);
}
((Steema.TeeChart.Styles.ValueList)bar1.ValuesLists[0]).Name = "My XValue
Name";
bar1.YValues.Name = "My YValue Name";
}
private void button1_Click(object sender, System.EventArgs e) {
Steema.TeeChart.Export.ExcelFormat excel = tChart1.Export.Data.Excel;
excel.IncludeHeader = true;
excel.IncludeIndex = true;
excel.IncludeLabels = true;
excel.Series = bar1;
excel.TextLineSeparator = ";";
excel.Save(@"C:\TEMP\test.xls");
}
Pep Jorge
http://support.steema.com
http://support.steema.com