使用c#进行pptx到xml的转换 [英] pptx to xml conversion using c#

查看:70
本文介绍了使用c#进行pptx到xml的转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用c#读取pptx文件并将其转换为xml文件。

how can i read pptx file and convert it into xml file using c#.

推荐答案





请参阅以下链接以阅读.pptx文件中的文字。

http://msdn.microsoft.com/en-us/library/office/cc850836.aspx [ ^ ]

http ://mantascode.com/?p = 661 [ ^ ]

http:// stackoverflow.com/questions/8029276/get-text-with-correct-font-from-pptx-with-openxml [ ^ ]



一旦你阅读了文本,那么你从该字符串中获取XMLDocument,尝试下面的代码。



Hi,

refer below links to read the text from .pptx file.
http://msdn.microsoft.com/en-us/library/office/cc850836.aspx[^]
http://mantascode.com/?p=661[^]
http://stackoverflow.com/questions/8029276/get-text-with-correct-font-from-pptx-with-openxml[^]

once you read the text, then you get the XMLDocument from that string, try below code for that.

StringReader reader = new StringReader(strText);
XmlTextReader xmlReader = new XmlTextReader(reader);
XmlDocument doc = new XmlDocument();
doc.Load(xmlReader);





希望它有所帮助。



hope it helps.


参见这个主题:如何在C#中将pptx文件转换为ppt [ ^ ]



干杯,

Edo
See this thread: How to convert a pptx file to ppt in C#[^]

Cheers,
Edo


这完全没有意义。 PPTX文件是PowerPoint 2007或更高版本的文件,它只是一个.ZIP文件,其中包含一堆.XML和其他资源文件。你提出的要求是不可能的。
That makes no sense at all. A PPTX file is a PowerPoint 2007 or higher file, which is just a .ZIP file with a bunch of .XML and other resource files already in it. What you ask isn''t possible in a way that makes any sense.


这篇关于使用c#进行pptx到xml的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆