• 大小: 233KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-09
  • 语言: 其他
  • 标签: PPT  OpenXMLPPT  

资源简介

DemoOpenXMLPPT OPemXML操作PPT,值支持07之后的版本

资源截图

代码片段和文件信息

using DocumentFormat.Openxml.Presentation;
using DocumentFormat.Openxml;
using A = DocumentFormat.Openxml.Drawing;
using P14 = DocumentFormat.Openxml.Office2010.PowerPoint;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DemoOpenxmlPPT
{
   
    public class GeneratedClass
    {
        // Creates an Slide instance and adds its children.
       
        public Slide GenerateSlide()
        {
            Slide slide1 = new Slide();
            slide1.AddNamespaceDeclaration(“a“ “http://schemas.openxmlformats.org/drawingml/2006/main“);
            slide1.AddNamespaceDeclaration(“r“ “http://schemas.openxmlformats.org/officeDocument/2006/relationships“);
            slide1.AddNamespaceDeclaration(“p“ “http://schemas.openxmlformats.org/presentationml/2006/main“);

            CommonSlideData commonSlideData1 = new CommonSlideData();

            ShapeTree shapeTree1 = new ShapeTree();

            NonVisualGroupShapeProperties nonVisualGroupShapeProperties1 = new NonVisualGroupShapeProperties();
            NonVisualDrawingProperties nonVisualDrawingProperties1 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U Name = ““ };
            NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties1 = new NonVisualGroupShapeDrawingProperties();
            ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties1 = new ApplicationNonVisualDrawingProperties();

            nonVisualGroupShapeProperties1.Append(nonVisualDrawingProperties1);
            nonVisualGroupShapeProperties1.Append(nonVisualGroupShapeDrawingProperties1);
            nonVisualGroupShapeProperties1.Append(applicationNonVisualDrawingProperties1);

            GroupShapeProperties groupShapeProperties1 = new GroupShapeProperties();

            A.TransformGroup transformGroup1 = new A.TransformGroup();
            A.Offset offset1 = new A.Offset() { X = 0L Y = 0L };
            A.Extents extents1 = new A.Extents() { Cx = 0L Cy = 0L };
            A.ChildOffset childOffset1 = new A.ChildOffset() { X = 0L Y = 0L };
            A.ChildExtents childExtents1 = new A.ChildExtents() { Cx = 0L Cy = 0L };

            transformGroup1.Append(offset1);
            transformGroup1.Append(extents1);
            transformGroup1.Append(childOffset1);
            transformGroup1.Append(childExtents1);

            groupShapeProperties1.Append(transformGroup1);

            Shape shape1 = new Shape();

            NonVisualShapeProperties nonVisualShapeProperties1 = new NonVisualShapeProperties();
            NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U Name = “title 1“ };

            NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties1 = new NonVisualShapeDrawingProperties();
            A.ShapeLocks shapeLocks1 = new A.ShapeLocks() { NoGro

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         932  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT.sln
     文件       28160  2012-11-27 13:49  DemoOpenxmlPPT\DemoOpenxmlPPT.v11.suo
     目录           0  2012-11-26 17:23  DemoOpenxmlPPT\DemoOpenxmlPPT\
     文件         187  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\App.config
     目录           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\
     目录           0  2012-12-01 14:37  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\
     文件       17920  2012-12-01 15:13  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\DemoOpenxmlPPT.exe
     文件         187  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\DemoOpenxmlPPT.exe.config
     文件       28160  2012-12-01 15:13  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\DemoOpenxmlPPT.pdb
     文件       22472  2012-12-01 15:01  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\DemoOpenxmlPPT.vshost.exe
     文件         187  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\DemoOpenxmlPPT.vshost.exe.config
     文件         490  2012-06-02 15:34  DemoOpenxmlPPT\DemoOpenxmlPPT\bin\Debug\DemoOpenxmlPPT.vshost.exe.manifest
     文件        2948  2012-11-26 17:44  DemoOpenxmlPPT\DemoOpenxmlPPT\DemoOpenxmlPPT.csproj
     文件       14279  2012-12-01 14:37  DemoOpenxmlPPT\DemoOpenxmlPPT\GeneratedClass.cs
     目录           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\
     目录           0  2012-12-01 15:13  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\
     文件         772  2012-12-01 15:01  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\DemoOpenxmlPPT.csproj.FileListAbsolute.txt
     文件     1387078  2012-12-01 14:55  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\DemoOpenxmlPPT.csprojResolveAssemblyReference.cache
     文件       17920  2012-12-01 15:13  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\DemoOpenxmlPPT.exe
     文件       28160  2012-12-01 15:13  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\DemoOpenxmlPPT.pdb
     文件        7006  2012-11-26 17:44  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\obj\Debug\TempPE\
     文件       10805  2012-12-01 15:12  DemoOpenxmlPPT\DemoOpenxmlPPT\Program.cs
     目录           0  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\Properties\
     文件        1440  2012-11-26 16:42  DemoOpenxmlPPT\DemoOpenxmlPPT\Properties\AssemblyInfo.cs
     目录           0  2012-12-01 15:13  DemoOpenxmlPPT\TEMPLATEPPT\
     文件       45850  2012-11-26 17:10  DemoOpenxmlPPT\TEMPLATEPPT\PPT_TEMPLATE.pptx
     文件       31493  2012-12-01 14:34  DemoOpenxmlPPT\TEMPLATEPPT\PPTDEMO.pptx
............此处省略0个文件信息

评论

共有 条评论