Supercharge your PowerPoint productivity with
Supercharge your PPT Productivity with PPTools - Click here to learn more.

Proud member of

PPTools

Image Export converts PowerPoint slides to high-quality images.

PPT2HTML exports HTML even from PowerPoint 2010 and 2013, gives you full control of PowerPoint HTML output, helps meet Section 508 accessibility requirements

Merge Excel data into PowerPoint presentations to create certificates, awards presentations, personalized presentations and more

Resize your presentations quickly and without distortion

Language Selector switches the text in your presentation from one language to another

FixLinks prevents broken links when you distribute PowerPoint presentations

Shape Styles brings styles to PowerPoint. Apply complex formatting with a single click.

Using Excel and Access data in PowerPoint Tables (by Brian Reilly and Naresh Nichani)

Do you have data in Excel or Access that you would like to use in PowerPoint tables?

This tutorial will give several examples of how to do this using VBA code.

This example shows how to place the code in PowerPoint, retrieve data from Excel and or Access and display it in a PowerPoint table, but you can adapt the same methods to using Excel or Access data for other purposes in your PowerPoint presentations or add-ins. Better yet, you can adapt the same techniques to any other application that supports VBA or even to Visual Basic projects.

We previously published an example of how to retrieve data from Excel or Access in pptfaq.com/FAQ00795.htm . This is an improvement on that method which worked only in Slide View and not in SlideShow View. This example will work either both Slide View and SlideShow View.

The accompanying example file is here: Rightclick and choose Save target As to download DisplayData-2.zip

The example opens up a wizard-like form which lets you browse for an Excel or Access file.

After browsing for the file click the "Open" button to fill the browse text box on the form. Then click the "Next" button.

The form will populate the left hand side list box with a list of all tables in the Access file or all worksheets in the Excel file. Choosing one of the tables or worksheets will poplate the right hand side listbox with the available fields or column labels. Checkboxes permit you to choose which items you want to show in your table.

Click "Next" to choose how many records per page you want to show in the PowerPoint table. And you can change the Title of the table here as well.

Then click "Finish" and the table will be created.

The code lets you choose how to format the fonts and fills in the table. Look in the function "CreateSlide" (search for ".Fill" in the code).

I have made the fonts Arial white and made the fill a variation on red, but you can change the formatting to whatever suits your needs.

        With oShapeInsideTable.Fill
            .Solid
            .ForeColor.RGB = RGB(227, 37, 51)
        End With

There are other settings for line height etc. The code is provided in unprotected format and most of the working code is assigned to the userform and completely viewable in the VBE.

Good luck and feel free to post questions in the PowerPoint Newsgroup.


Did this solve your problem? If so, please consider supporting the PPT FAQ with a small PayPal donation.
Page copy protected against web site content infringement by Copyscape Contents © 1995 - 2022 Stephen Rindsberg, Rindsberg Photography, Inc. and members of the MS PowerPoint MVP team. You may link to this page but any form of unauthorized reproduction of this page's contents is expressly forbidden.

Supercharge your PPT Productivity with PPTools

content authoring & site maintenance by
Friday, the automatic faq maker (logo)
Friday - The Automatic FAQ Maker

Using Excel and Access data in PowerPoint Tables (by Brian Reilly and Naresh Nichani)
http://www.pptfaq.com/FAQ00892_Using_Excel_and_Access_data_in_PowerPoint_Tables_-by_Brian_Reilly_and_Naresh_Nichani-.htm
Last update 13 October, 2011
Created: