Beispiel #1
0
        public override IExcelObj <TChart> Copy(IExcelSheet Target)
        {
            var NewChart = Target.To <ExcelSheetMicrosoft>().PackSheet.Shapes.AddChart2();

            PackChart.Copy();
            NewChart.Chart.Paste();
            NewChart.Chart.ChartType = PackChart.ChartType.To <Microsoft.Office.Interop.Excel.XlChartType>();
            return((IExcelObj <TChart>)NewChart.ToChart(Target));
        }
Beispiel #2
0
        public override IWordParagraphObj <TChart> Copy(IWordDocument Target, Index?Pos = null)
        {
            var Doc      = Target.To <WordDocumentMicrosoft>();
            var Index    = Doc.ToUnderlying(Doc.ToIndexActual(Pos), false);
            var PackDoc  = Doc.PackDocument;
            var NewChart = PackDoc.InlineShapes.AddChart2(Range: PackDoc.Range(Index));

            PackChart.Copy();
            NewChart.Chart.Paste();
            NewChart.Chart.ChartType = PackChart.ChartType;
            return((IWordParagraphObj <TChart>)NewChart.ToChart(Doc));
        }