如何将HTML DIV内容导出到ASP.Net C中的powerpoint幻灯片#

时间:2014-04-29 09:12:01

标签: c# jquery html asp.net powerpoint

我正在尝试将div标签的所有内容导出到ppt文件中。我可以为doc和excel做这个,因为有一个开放的word和excel的xml格式。我为ppt做了以下事情,但没有得到正确的结果。 这是我的HTML代码

<body>
    <form id="form1" runat="server">
    <div id="demo" runat=server>
        <h1>Click the button to Export</h1>
        <h3>This page contain a heading,paragraph and a table</h3>

    </div>
    <asp:Button ID="export" OnClick="Export_to_ppt" Text="Export" runat="server" />
    </form>
</body>

这里是cs代码

 string elements = demo.InnerHtml;
 Response.ContentType = "application/vnd.ms-powerpoint";
 Response.AddHeader("content-disposition", "attachment; filename=sample.ppt");  
 Response.Write(elements);
 Response.End();

在我的结果中,每个内容都显示,但html标签也显示出来。但我只是想在html页面中看到它。每个内容也以不同的幻灯片打印,但我希望在一张幻灯片中看到这些内容。

请帮助我。

0 个答案:

没有答案