如何更改系列列图表对齐以使用Microsoft.Office.Interop.Word旋转90

时间:2013-11-17 10:44:16

标签: c# ms-word

private static void GetDataSheetColumn(Word._Document oWordDoc, object oMissing, string bookmark, string startRange, string endRange, Dictionary<string, string> cellRange, string title)
{
    object oRng = oWordDoc.Bookmarks[bookmark].Range;
    var wdChart = oWordDoc.InlineShapes.AddChart(XlChartType.xl3DColumnClustered, ref oRng).Chart;
    var chartData = wdChart.ChartData;
    var dataWorkbook = (Workbook)chartData.Workbook;
    var dataSheet = (Worksheet)dataWorkbook.Worksheets[1];
    var tRange = dataSheet.Cells.Range[startRange, endRange];
    var tbl1 = dataSheet.ListObjects["Table1"];
    tbl1.Resize(tRange);

    foreach (var item in cellRange)
    {

        dataSheet.Cells.Range[item.Key, oMissing].FormulaR1C1 = item.Value;
    }
    wdChart.ApplyDataLabels(XlDataLabelsType.xlDataLabelsShowValue, oMissing, oMissing, oMissing, oMissing, oMissing,
        oMissing, oMissing, oMissing, oMissing);
    dataWorkbook.Application.Quit();
}

如何将系列文本对齐旋转到90?

我使用的是Microsoft.Office.Interop.Word

plz在图像之后和之前看到 enter image description here

enter image description here

1 个答案:

答案 0 :(得分:0)