//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); //Open an excel file var fileStream = this.GetResourceStream("xlsx\\Manufacturing output chart.xlsx"); workbook.Open(fileStream); IWorksheet worksheet = workbook.Worksheets[0]; IShape shape = worksheet.Shapes[0]; IAxis category_axis = shape.Chart.Axes.Item(AxisType.Category); //config tick label's angle category_axis.TickLabels.Orientation = -45; // Save to an excel file workbook.Save("ConfigTickMarkLabelAngle.xlsx");
' Create a new Workbook Dim workbook As New Workbook 'Open an excel file Dim fileStream = GetResourceStream("xlsx\Manufacturing output chart.xlsx") workbook.Open(fileStream) Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim shape As IShape = worksheet.Shapes(0) Dim category_axis As IAxis = shape.Chart.Axes.Item(AxisType.Category) 'config tick label's angle category_axis.TickLabels.Orientation = -45 ' save to an excel file workbook.Save("ConfigTickMarkLabelAngle.xlsx")