Exporting PPT2000 table into HTML?

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

I've got a large table in a PPT2000 slide that I'd like to convert into a
simple HTML table. The PPT2000 Save As HTML gives me so much bloated code
it's unusable. I'd like a nice simple cut and paste, but all that does is
give me an image!

Isn't there a way to take a table in a PPT2000 slide and turn it into a
simple HTML table???

Thanks
 
I've got a large table in a PPT2000 slide that I'd like to convert into a
simple HTML table. The PPT2000 Save As HTML gives me so much bloated code
it's unusable. I'd like a nice simple cut and paste, but all that does is
give me an image!

Isn't there a way to take a table in a PPT2000 slide and turn it into a
simple HTML table???

Not really.

ISTR that there's a way to do this from Excel though. It's a bit frustrating,
but works reasonably well. I think it's something like:

Select the part of the sheet you want to save
Choose File Save As, Web Page
Pick Selection rather than entire workbook
Save

On the other hand, with a bit of VBA ... maybe .... hmmm ....

Well yeah. Here you go:

Convert PowerPoint tables to HTML
http://www.rdpslides.com/pptfaq/FAQ00748.htm

It converts the selected table to a very simple HTML page and writes the
results to C:\Table.htm

Rename, use as is, copy, paste, edit ... whatever you like from there.
 
Steve Rindsberg said:
Not really.

ISTR that there's a way to do this from Excel though. It's a bit frustrating,
but works reasonably well. I think it's something like:

Select the part of the sheet you want to save
Choose File Save As, Web Page
Pick Selection rather than entire workbook
Save

On the other hand, with a bit of VBA ... maybe .... hmmm ....

Well yeah. Here you go:

Convert PowerPoint tables to HTML
http://www.rdpslides.com/pptfaq/FAQ00748.htm

It converts the selected table to a very simple HTML page and writes the
results to C:\Table.htm

Rename, use as is, copy, paste, edit ... whatever you like from there.

Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com

YES!!!

That Did it!

Thanks, Steve!

(BTW, I'm a licensed user of PPTools.)
 
Hey, Steve, is there any way to modify around or at the line:

Open "C:\Table.htm" For Output As #iFileNum

so that it either prompts me for a location to save the HTML file, or, I get
an alert dialog box telling (reminding) me where it saved the table?

Thanks so much,

Bill
 
Never mind, I figured out how to use MsgBox.

I figured you would. <g>
But try it with these mods, which let you type in the name of the file you want
to save to:

Sub TableToHTML()

Dim oTable As Table
Dim oSh As Shape
Dim lColumn As Long
Dim lRow As Long
Dim sTableHTML As String
Dim sFileName As String

' No error checking here
' It's up to user to select a PowerPoint table before running this
' Note: POWERPOINT table, not pasted Word or Excel tables

' Start table off:
sTableHTML = "<html>" & vbCrLf _
& "<head>" & vbCrLf _
& "</head>" & vbCrLf _
& "<body>" & vbCrLf & vbCrLf _
& "<table>" & vbCrLf

Set oTable = ActiveWindow.Selection.ShapeRange(1).Table
With oTable
For lRow = 1 To .Rows.Count
sTableHTML = sTableHTML & vbTab & "<tr>" & vbCrLf
For lColumn = 1 To .Columns.Count
sTableHTML = sTableHTML _
& vbTab & vbTab & "<td>" _
& .Cell(lRow, lColumn).Shape.TextFrame.TextRange.Text _
& "</td>" & vbCrLf
Next
sTableHTML = sTableHTML & vbTab & "</tr>" & vbCrLf
Next
End With

' finish up
sTableHTML = sTableHTML & "</table>" & vbCrLf _
& "</body>" & vbCrLf _
& "</html>" & vbCrLf

' display the result in Immediate window
' Press Ctrl+G if you don't see the output
Debug.Print sTableHTML

sFileName = InputBox("Type full path of file to save table to:", "Save to
...", "c:\Table.htm")

If sFileName = "" Then
MsgBox "Naughty naughty ... must give Mr. Macro a Filename!"
Exit Sub
End If

' Save to file
Dim iFileNum As Integer
iFileNum = FreeFile()
Open sFileName For Output As #iFileNum
Print #iFileNum, sTableHTML
Close #iFileNum

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top