你将它‘复制’‘粘贴’到Word里不就可以了。

解决方案 »

  1.   

    Mistruster(弱智d):
    呵呵,那以后做web程序的时候我得捆绑一个Office或者WindowsXP了。:)
      

  2.   

    Mistruster(弱智d):
    是呀,你教给人家个好用的吗,虽然你的办法很好用!可以生成一个.xsl文件或者是.txt文件呀
      

  3.   


    如果想要打印控件的话,可以买,但要花钱,也不便宜,也可以自己写,但一时半伙是写不出来的.简单的办法:你先把要打印的样式在word里做一份,然后把这word文件另存为html文件,你就可以在PHP程序读出数据,把这些数据写在这html文件了,就可以直接打印了,这样打印的效果与word一样的.
      

  4.   

    <head>
    <title>打印确认</title>
    <style media="print">
    .noprint { display: none }
    </style>
    </head>
    <body>
    <object id="factory" style="display:none" viewastext classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object>
    <script defer>
    function window.onload() {
      //factory.printing.paperSize = "A3"
      factory.printing.header = ""
      factory.printing.footer = ""
      factory.printing.portrait = true
      idPrint1.disabled = false; // enable UI button
      idPrint2.disabled = false;
      idPrint3.disabled = false;
      idPrint4.disabled = false;
      factory.printing.leftMargin = 0
      factory.printing.topMargin = 5
      factory.printing.rightMargin = 5
      factory.printing.bottomMargin = 5
      }
    </script>
    <span style="text-decoration:underline">打印程序的初步研究</span> 
    <div class=noprint>
      <input id="idPrint1" type="button" value="打印本页"
     onclick="factory.printing.Print(false)">
      <input id="idPrint2" type="button" value="页面设置"
     onclick="factory.printing.PageSetup()">
      <input id="idPrint3" type="button" value="打印预览"
     onclick="factory.printing.Preview()">
      <input id="idPrint4" type="button"
     onclick="window.close()" value="关闭窗口">
    </div>
    <br/>
    <table width="720" border="0" cellspacing="0" cellpadding="0" align="center" >
      <tr> 
        <td  bgcolor="#0099ff"> 没事偷着做</td>
    </tr></table></body>
    看看这个,希望对你有帮助,是通过javascript和css实现的
      

  5.   

    写word,excle后怎样打印阿?
    是否下载之后,让用户自己打印,
    还是直接用页面打开?然后让用户自己打印?关注打印问题mrsun(孙继海) 还是使用了控件嘛好像把票据画到frame,iframe中,然后打印frame也可以,以前实现过,但是又有份页问题