Skip to content

Commit 9216e56

Browse files
926787-PositionChart
1 parent f3ff86a commit 9216e56

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Create and Edit Charts/Position Chart/.NET/Position Chart/Position Chart/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ static void Main(string[] args)
1212
{
1313
IApplication application = excelEngine.Excel;
1414
application.DefaultVersion = ExcelVersion.Xlsx;
15-
16-
// Create a new workbook
1715
IWorkbook workbook = application.Workbooks.Create(1);
1816
IWorksheet worksheet = workbook.Worksheets[0];
1917

20-
// Fill sample data
18+
//Add data
2119
worksheet.Range["A1"].Text = "Category";
2220
worksheet.Range["B1"].Text = "Value";
2321
worksheet.Range["A2"].Text = "A";
@@ -27,7 +25,7 @@ static void Main(string[] args)
2725
worksheet.Range["B3"].Number = 20;
2826
worksheet.Range["B4"].Number = 30;
2927

30-
// Add a chart
28+
//Add a chart
3129
IChartShape chart = worksheet.Charts.Add();
3230
chart.DataRange = worksheet.Range["A1:B4"];
3331
chart.ChartType = ExcelChartType.Column_Clustered;

Create and Edit Charts/Position Chart/.NET/Position Chart/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ using (ExcelEngine excelEngine = new ExcelEngine())
2121
{
2222
IApplication application = excelEngine.Excel;
2323
application.DefaultVersion = ExcelVersion.Xlsx;
24-
25-
// Create a new workbook
2624
IWorkbook workbook = application.Workbooks.Create(1);
2725
IWorksheet worksheet = workbook.Worksheets[0];
2826

29-
// Fill sample data
27+
//Add data
3028
worksheet.Range["A1"].Text = "Category";
3129
worksheet.Range["B1"].Text = "Value";
3230
worksheet.Range["A2"].Text = "A";
@@ -36,7 +34,7 @@ using (ExcelEngine excelEngine = new ExcelEngine())
3634
worksheet.Range["B3"].Number = 20;
3735
worksheet.Range["B4"].Number = 30;
3836

39-
// Add a chart
37+
//Add a chart
4038
IChartShape chart = worksheet.Charts.Add();
4139
chart.DataRange = worksheet.Range["A1:B4"];
4240
chart.ChartType = ExcelChartType.Column_Clustered;

0 commit comments

Comments
 (0)