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在图像之后和之前看到
答案 0 :(得分:0)
它可能会有所帮助,但不确定它是否仅适用于Word Art: