怎样读取ppt内容

1、java版本号
public string PptReader(string filename)
{
string fullname = DocPath+filename; //绝对路径
PowerPoint.Application papp = new PowerPoint.Application();
PowerPoint.Presentation ppr = papp.Presentations.Open(fullname, Microsoft.Office.Core.MsoTriState.msoCTrue,
MsoTriState.msoFalse, MsoTriState.msoFalse);
string doc = "";
foreach (PowerPoint.Slide slide in ppr.Slides)
{
foreach (PowerPoint.Shape shape in slide.Shapes)
{
if (shape.HasTextFrame. == MsoTriState.msoTrue)
{
if (shape.TextFrame.HasText == MsoTriState.msoTrue)
{
doc += shape.TextFrame.TextRange.Text.ToString();
doc += "/n";
}
}

}
}

ppr.Close();
System.Runtime.InteropServices.Marshal.ReleaseComObject(ppr);
ppr = null;
papp.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject(papp);
papp = null;
return doc;
}

兴许提供javascript怎样读取ppt,欢迎交流!
原文地址:https://www.cnblogs.com/wgwyanfs/p/6919679.html