Does anyone know how to fill in a Powerpoint table with MATLAB? I can
do program everything else I need it to do but when I use the Cell
method I get an error stating "??? No appropriate method, property, or
field Selection for class
Interface.Microsoft_PowerPoint_12.0_Object_Library.Shape."
My code is
PPT = actxserver('PowerPoint.Application');
PPT.Visible = true;
PPTpres = invoke(ppt.Presentations,'Add');
Slide1=invoke(PPTpres.Slides,'Add',1,12);
Table1=Slide1.Shapes.AddTable(3, 4, 10, 10, 288, 216);
Table1.Cell(1, 1).Shape.TextFrame.TestRange.Text='test'
I've tried several different variants of the last line and nothing has
worked yet.
Thanks,
Rick
|
|
0
|
|
|
|
Reply
|
rickcanham (2)
|
1/25/2010 11:32:59 PM |
|
rickcanham <rickcanham@hotmail.com> wrote in message <71a3ac6c-15cd-4262-af0e-ed5e7927b597@33g2000yqo.googlegroups.com>...
> Does anyone know how to fill in a Powerpoint table with MATLAB? I can
> do program everything else I need it to do but when I use the Cell
> method I get an error stating "??? No appropriate method, property, or
> field Selection for class
> Interface.Microsoft_PowerPoint_12.0_Object_Library.Shape."
>
> My code is
>
> PPT = actxserver('PowerPoint.Application');
> PPT.Visible = true;
> PPTpres = invoke(ppt.Presentations,'Add');
> Slide1=invoke(PPTpres.Slides,'Add',1,12);
> Table1=Slide1.Shapes.AddTable(3, 4, 10, 10, 288, 216);
> Table1.Cell(1, 1).Shape.TextFrame.TestRange.Text='test'
>
> I've tried several different variants of the last line and nothing has
> worked yet.
> Thanks,
> Rick
Why don't you use the activex for excel, then import the excel table to powerpoint. I mean excel is very easy to do , and there are lots of documentation on that.
|
|
0
|
|
|
|
Reply
|
ade77
|
1/26/2010 12:15:24 AM
|
|
Dear Rick
This works:
Table1.Table.Cell(1,1).Shape.TextFrame.TextRange.text = 'Test'
using the "code complete" (pressing "tab") and functions like get and inspect can help you out on these not-documented features.
There are many reason to NOT go via Excel. For instance, if you open an existing ppt/pptx, the table you create folows any masters in the presentation.
Peter
rickcanham <rickcanham@hotmail.com> wrote in message <71a3ac6c-15cd-4262-af0e-ed5e7927b597@33g2000yqo.googlegroups.com>...
> Does anyone know how to fill in a Powerpoint table with MATLAB? I can
> do program everything else I need it to do but when I use the Cell
> method I get an error stating "??? No appropriate method, property, or
> field Selection for class
> Interface.Microsoft_PowerPoint_12.0_Object_Library.Shape."
>
> My code is
>
> PPT = actxserver('PowerPoint.Application');
> PPT.Visible = true;
> PPTpres = invoke(ppt.Presentations,'Add');
> Slide1=invoke(PPTpres.Slides,'Add',1,12);
> Table1=Slide1.Shapes.AddTable(3, 4, 10, 10, 288, 216);
> Table1.Cell(1, 1).Shape.TextFrame.TestRange.Text='test'
>
> I've tried several different variants of the last line and nothing has
> worked yet.
> Thanks,
> Rick
|
|
0
|
|
|
|
Reply
|
Peter
|
3/22/2010 4:31:26 PM
|
|
Hi all,
I have a similar but slightly different problem: I need to update some tables periodically, I don't want to change the format (color, font etc) of existing tables, only need to update the numbers. I guess this can be done by something similar to "Table1.Table.Cell(1,1).Shape.TextFrame.TextRange.text = 'Test'"
but how do I get the reference to "Slide1" and "Table1" in the first place? I'm not creating new slide or table, but try to access existing ones.
Many thanks.
|
|
0
|
|
|
|
Reply
|
jjg_huang
|
4/15/2011 1:13:05 PM
|
|
> PPT = actxserver('PowerPoint.Application');
> PPT.Visible = true;
> PPTpres = invoke(ppt.Presentations,'Add');
> Slide1=invoke(PPTpres.Slides,'Add',1,12);
> Table1=Slide1.Shapes.AddTable(3, 4, 10, 10, 288, 216);
> Table1.Cell(1, 1).Shape.TextFrame.TestRange.Text='test'
Replace last line with:
Table1.Table.Cell(2,2).Shape.TextFrame.TextRange.Text = 'test'
|
|
0
|
|
|
|
Reply
|
alain.brenzikofer1121 (1)
|
5/2/2013 7:40:08 AM
|
|
|
4 Replies
662 Views
(page loaded in 0.09 seconds)
Similiar Articles: Enter text in a table for powerpoint 2007? - comp.soft-sys.matlab ...Does anyone know how to fill in a Powerpoint table with MATLAB? I can do program everything else I need it to do but when I use the Cell method I ge... PowerPoint: Make right-click go to previous slide? - comp.sys.mac ...Enter text in a table for powerpoint 2007? - comp.soft-sys.matlab ..... NOT go via Excel. For instance, if you open an existing ppt/pptx, the table you create ... to ... Edrawings In PowerPoint - comp.cad.solidworksEnter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... Edrawings In PowerPoint - comp.cad.solidworks... happens (or doesn't) is that when you insert the ... Insert page breaks? - comp.text.pdfEnter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... Insert page breaks? - comp.text.pdf iText and PDF template with table - comp.text.pdf > insert a ... Access 2007 autofill DLookup - comp.databases.ms-accessI enter data into Plant_list table from a ... Text Buttercup Table of ... Access 2007 autofill DLookup - comp.databases.ms-access I enter data into Plant_list table ... How to right align numbers in browse table? - comp.databases ...Enter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... How to right align numbers in browse table? - comp.databases ... Enter text in a table for powerpoint ... Enboldening text in word from matlab - comp.soft-sys.matlab ...Enter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... Enboldening text in word from matlab - comp.soft-sys.matlab ... Enter text in a table for powerpoint ... ddepoke, color of text in excel - comp.soft-sys.matlabEnter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... ddepoke, color of text in excel - comp.soft-sys.matlab Enter text in a table for powerpoint 2007 ... JTable, aligning text - comp.lang.java.guiEnter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... How to right align numbers in browse table? - comp.databases ..... lang.java.gui How to right align ... Append text to existing field on Update - comp.databases.btrieve ...Enter text in a table for powerpoint 2007? - comp.soft-sys.matlab ... Append text to existing field on Update - comp.databases.btrieve ... Enter text in a table for ... How to Insert in PowerPoint 2007 | eHow.comPowerPoint 2007 offers five categories of elements you can insert: "Tables," "Illustrations," "Links," "Text" and "Media Clips." You can access these insert ... How to Enter Text Into Powerpoint 2007 | eHow.comHow to Insert in PowerPoint 2007. PowerPoint 2007 offers five categories of elements you can insert: "Tables," "Illustrations," "Links," "Text" and "Media Clips." 7/26/2012 3:08:48 AM
|