Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 296563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:33:36+00:00 2026-05-12T06:33:36+00:00

I have been asked to automate a particular task at work today which takes

  • 0

I have been asked to automate a particular task at work today which takes up a lot of our time! The following is what needs to be done and I would appreciate any help on how I can do this (Implementation Advice) within the realms of my knowledge, if possible.

Problem

I have a PowerPoint document (.ppt). I would like to extract text from there (the text is in bullet point format). I would like to insert these bullets points into an Excel sheet, each bullet point should be a row. I would also like to put in the adjacent column the page this bullet point text was taken from.

So, basically: Extract from ppt –> Insert into Excel sheet each row being a bullet point.

Technologies available to me

Perl, PHP and Java.

I would prefer PHP to be honest as this is my primary language, but I am happy to consider anything else you guys/gals think is best. Second would be Perl and then Java. I do not want to be compiling classes and installing the JDK just for this! 🙂

Key Questions

  • How do you reference a bullet point?
  • Am I likely to end up with just a load of unstructured text in the Excel sheet?
  • Are there any barriers to reading from a ppt file?

Update

I would consider MS technologies (VB, etc.) if it makes life easier but I have never used it and I despise MS technology! Hope I don’t get flamed by the evangelists! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:33:36+00:00Added an answer on May 12, 2026 at 6:33 am

    Here is a sample script using Win32::OLE.

    By the way, once you have converted the slides into a format you can process, you can use Spreadsheet::WriteExcel on non-MS systems to write the output. Therefore, I would recommend two programs: One to transform the PowerPoint documents and another to generate the Excel files.

    Note that an excellent source of information for Microsoft Office applications is the Object Browser. You can access it via Tools → Macro → Visual Basic Editor. Once you are in the editor, hit F2 to browse the interfaces, methods, and properties provided by Microsoft Office applications.

    #!/usr/bin/perl
    
    use strict;
    use warnings;
    
    use FindBin qw( $Bin );
    use File::Spec::Functions qw( catfile );
    
    use Win32::OLE;
    use Win32::OLE::Const 'Microsoft PowerPoint';
    $Win32::OLE::Warn = 3;
    
    my $ppt = get_ppt();
    $ppt->{Visible} = 1;
    
    my $ppt_file = catfile $Bin, 'test.ppt';
    my $doc = $ppt->Presentations->open( $ppt_file );
    my $slides = $doc->Slides;
    my $num_slides = $slides->Count;
    
    for my $slide_idx (1 .. $num_slides) {
        print "=== Begin Slide $slide_idx ===\n";
    
        my $slide = $doc->Slides->Item( $slide_idx );
        my $shapes = $slide->Shapes;
        my $num_shapes = $shapes->Count;
    
        for my $shape_idx (1 .. $num_shapes) {
            my $shape = $shapes->Item($shape_idx);
            next unless $shape->HasTextFrame;
    
            my $pars = $shape->TextFrame->TextRange->Paragraphs;
            my $num_pars = $pars->Count;
            for my $par_idx (1 .. $num_pars) {
                my $par = $pars->Paragraphs($par_idx,1);
                print_par( $par );
            }
        }
    
        print "=== End Slide $slide_idx ===\n\n";
    }
    
    sub print_par {
        my ($par) = @_;
        my @bullets = qw( - * > + = @ );
    
        my $bullet_format = $par->ParagraphFormat->Bullet;
        my $bullet_type = $bullet_format->Type;
    
        my $bullet_char = '';
    
        if ($bullet_type == ppBulletNumbered) {
            $bullet_char = $bullet_format->Number . "\t";
        }
        elsif( $bullet_type == ppBulletUnnumbered ) {
            # Need a Unicode => ASCII mapping if you want to use
            # $bullet_format->Character
            my $indent = $par->IndentLevel % scalar @bullets;
            $bullet_char = $bullets[$indent] . "\t";
        }
    
        my $text = $par->Text;
        $text =~ s/\s+$//;
    
        print $bullet_char, $text,"\n";
    }
    
    sub get_ppt {
        my $app;
        eval {
            $app = Win32::OLE->GetActiveObject('PowerPoint.Application');
        };
    
        die "$@\n" if $@;
    
        unless($app) {
            $app = Win32::OLE->new(
                'PowerPoint.Application', sub { $_[0]->Quit }
            ) or die "Oops, cannot start PowerPoint: ",
                     Win32::OLE->LastError, "\n";
        }
        return $app;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been asked to come up with a solution which would allow our
I have been asked to generate a Backup Script. Which comprises of a lot
I have been asked to provide information on available techniques for assessing our current,
I have been asked to investigate the possibility of launching our companies current desktop
i have been asked to write a query which in should rank customers base
I have been asked this question in interview how does XML and Soap work
We have been asked to provide all of the possible error messages in our
I have been asked to design & develop a page in asp.net which contains
I have been asked in an interview the following question: What is the default
I have been asked to evaluate the Android platform for our product and I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.