Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. wants to display rows in a powerpoint using vs2008

wants to display rows in a powerpoint using vs2008

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dsaikrishna
    wrote on last edited by
    #1

    Hi to all, I am currently working on vs2008 generating powerpoint presentations. I have a problem in representing the entire set of data into a table using vs2008 in a powerpoint Can anyone suggest me in this matter how to proceed Thanks inadvance

    sai krishna

    D S 2 Replies Last reply
    0
    • D dsaikrishna

      Hi to all, I am currently working on vs2008 generating powerpoint presentations. I have a problem in representing the entire set of data into a table using vs2008 in a powerpoint Can anyone suggest me in this matter how to proceed Thanks inadvance

      sai krishna

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      I think you should give a try using Interop.

      50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

      1 Reply Last reply
      0
      • D dsaikrishna

        Hi to all, I am currently working on vs2008 generating powerpoint presentations. I have a problem in representing the entire set of data into a table using vs2008 in a powerpoint Can anyone suggest me in this matter how to proceed Thanks inadvance

        sai krishna

        S Offline
        S Offline
        ScottM1
        wrote on last edited by
        #3

        How are you creating the Powerpoint presentation? Are you using the PIA's or some other method?

        D 1 Reply Last reply
        0
        • S ScottM1

          How are you creating the Powerpoint presentation? Are you using the PIA's or some other method?

          D Offline
          D Offline
          dsaikrishna
          wrote on last edited by
          #4

          hi i m creating a predefined template in that i want to bind the database values into the powerpoint using vs2008 in a form of grid i want to display the table values into the powerpoint

          sai krishna

          S 1 Reply Last reply
          0
          • D dsaikrishna

            hi i m creating a predefined template in that i want to bind the database values into the powerpoint using vs2008 in a form of grid i want to display the table values into the powerpoint

            sai krishna

            S Offline
            S Offline
            ScottM1
            wrote on last edited by
            #5

            OK, but what are you using to generate the the powerpoint presentation? Are you importing Microsoft.Office.Interop.PowerPoint?

            D 1 Reply Last reply
            0
            • S ScottM1

              OK, but what are you using to generate the the powerpoint presentation? Are you importing Microsoft.Office.Interop.PowerPoint?

              D Offline
              D Offline
              dsaikrishna
              wrote on last edited by
              #6

              yes scott iam importing that namespace i m writing in my button click event like this { int count = 0; string strTemplate = string.Empty; int shpCount = 1; //core.MsoTriState objTriState = core.MsoTriState.msoTrue; string strPPTName = @"d:\EDPresentation.pptx"; string strPPTPath = @"D:\PPT-Opty1\PPT-Opty\"; strTemplate = strPPTPath + "Presentation5.pptx"; Application objApp = new ApplicationClass(); _Presentation objPres = objApp.Presentations.Open(strTemplate, core.MsoTriState.msoFalse, core.MsoTriState.msoTrue, core.MsoTriState.msoFalse); Slides objSlides = objPres.Slides; TextRange objTextRng; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { objSlides.InsertFromFile(strTemplate,count, 1, 1); _Slide objSlide = objSlides[ds.Tables[0].Rows.Count-1]; //for (shpCount = 1; shpCount <= objSlide.Shapes.Count; shpCount++) //{ Microsoft.Office.Interop.PowerPoint.Shape objShape; // foreach (DataColumn dc in ds.Tables[0].Columns) // { // if (objSlide.Shapes[shpCount].AlternativeText.Trim().Equals(dc.ColumnName)) // { objShape = objSlide.Shapes[shpCount]; objSlide.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, 100, 100, 100, 80); objShape.TextFrame.TextRange.Text = ds.Tables[0].Rows[i][dc.ColumnName].ToString(); } objPres.SaveAs(strPPTName, PpSaveAsFileType.ppSaveAsPresentation, core.MsoTriState.msoTrue); objPres.Close(); objApp.Quit(); }

              sai krishna

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups