//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; GrapeCity.Documents.Excel.Drawing.IShape shape = worksheet.Shapes.AddChart(GrapeCity.Documents.Excel.Drawing.ChartType.Column3D, 250, 20, 350, 250); worksheet.Range["A1:D6"].Value = new object[,] { {null, "S1", "S2", "S3"}, {"Item1", 10, 25, 25}, {"Item2", -51, -36, 27}, {"Item3", 52, -85, -30}, {"Item4", 22, 65, 65}, {"Item5", 23, 69, 69} }; shape.Chart.SeriesCollection.Add(worksheet.Range["A1:D6"], GrapeCity.Documents.Excel.Drawing.RowCol.Columns, true, true); // Config back wall and side wall together. shape.Chart.Walls.Thickness = 5; shape.Chart.Walls.Format.Fill.Color.RGB = Color.LightPink; shape.Chart.Walls.Format.Line.Color.RGB = Color.LightBlue; // Save to an excel file workbook.Save("ConfigChartWallStyle.xlsx");
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim shape As IShape = worksheet.Shapes.AddChart(ChartType.Column3D, 250, 20, 350, 250) worksheet.Range("A1:D6").Value = New Object(,) { {Nothing, "S1", "S2", "S3"}, {"Item1", 10, 25, 25}, {"Item2", -51, -36, 27}, {"Item3", 52, -85, -30}, {"Item4", 22, 65, 65}, {"Item5", 23, 69, 69} } shape.Chart.SeriesCollection.Add(worksheet.Range("A1:D6"), RowCol.Columns, True, True) 'config back wall and side wall together. shape.Chart.Walls.Thickness = 5 shape.Chart.Walls.Format.Fill.Color.RGB = Color.LightPink shape.Chart.Walls.Format.Line.Color.RGB = Color.LightBlue ' save to an excel file workbook.Save("ConfigChartWallStyle.xlsx")