find table RRS feed


  • Hi,

    You could use Open XML SDK Tools to get the tables by comparing files. You could visit Open XML SDK 2.5 for Microsoft Office to download it.

    Using Open XML SDK,

    1. Create two documents with one is original file and one is the target file;

    2. Use Open XML SDK 2.5 productivity Tool for Microsoft Office

    3. Click the Compare Files, generate the code, and then you could get the code what you want


    You could refer to the following to find the tables.

    using A = DocumentFormat.OpenXml.Drawing;


                using (PresentationDocument doc = PresentationDocument.Open(docName, true))


                    PresentationPart pptPart = doc.PresentationPart;


                    foreach (SlidePart slPart in pptPart.SlideParts)


                        Slide slide1 = slPart.Slide;


                        CommonSlideData commonSlideData1 = slide1.GetFirstChild<CommonSlideData>();

                        ShapeTree shapeTree1 = commonSlideData1.GetFirstChild<ShapeTree>();


                        foreach (GraphicFrame graphicFrame1 in shapeTree1.Elements<GraphicFrame>())


                        A.Graphic graphic1 = graphicFrame1.GetFirstChild<A.Graphic>();

                        A.GraphicData graphicData1 = graphic1.GetFirstChild<A.GraphicData>();

                        A.Table table1 = graphicData1.GetFirstChild<A.Table>();




    Monday, August 8, 2016 8:17 AM