TeeChart
[TeeChart] Excel 저장하기
kjun.kr
2022. 9. 19. 21:56
728x90
DataExport 를 이용해 처리합니다.
using Steema.TeeChart.Export;
using Steema.TeeChart.Styles;
using Steema.TeeChart.Tools;
namespace Win.TeeChartLegendClickTest
{
public partial class ChartForm : Form
{
public ChartForm()
{
InitializeComponent();
// Set SampleData
for (int i = 0; i < 10; i++)
{
Points points = new Points(this.tChart.Chart);
points.XValues.DateTime = true;
points.FillSampleValues(20);
}
}
private void ExcelButton_Click(object sender, EventArgs e)
{
// Save Excel
string fielPath = "d://test.xls";
DataExport dataExport = new DataExport(this.tChart);
ExcelFormat excelFormat = dataExport.Excel;
excelFormat.IncludeHeader = true;
excelFormat.IncludeIndex = true;
excelFormat.IncludeLabels = true;
excelFormat.Save(fielPath);
}
}
}
저장내용
728x90