• 表格导出


    kayalshri/tableExport.jquery.plugin

    文件大小太小的xls打不开,填充了空td才打开正常

    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <script src="jquery-1.10.2.js"></script>
        <script src="mybase64.js"></script>
        <script src="tableExport.js"></script>
    </head>
    <body>
        <table><thead><tr><th>时间</th><th>别名</th><th>名称</th><th>数值</th></tr></thead><tbody><tr><td>2016-08-19 15:03:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>441</td></tr><tr><td>2016-08-19 15:03:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>224</td></tr><tr><td>2016-08-19 15:03:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>93</td></tr><tr><td>2016-08-19 15:03:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>68</td></tr><tr><td>2016-08-19 15:03:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>12</td></tr><tr><td>2016-08-19 15:04:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1146</td></tr><tr><td>2016-08-19 15:04:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>591</td></tr><tr><td>2016-08-19 15:04:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>215</td></tr><tr><td>2016-08-19 15:04:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>198</td></tr><tr><td>2016-08-19 15:04:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>27</td></tr><tr><td>2016-08-19 15:05:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1177</td></tr><tr><td>2016-08-19 15:05:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>635</td></tr><tr><td>2016-08-19 15:05:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>228</td></tr><tr><td>2016-08-19 15:05:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>210</td></tr><tr><td>2016-08-19 15:05:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>23</td></tr><tr><td>2016-08-19 15:06:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1181</td></tr><tr><td>2016-08-19 15:06:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>559</td></tr><tr><td>2016-08-19 15:06:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>244</td></tr><tr><td>2016-08-19 15:06:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>197</td></tr><tr><td>2016-08-19 15:06:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>49</td></tr><tr><td>2016-08-19 15:07:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1161</td></tr><tr><td>2016-08-19 15:07:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>605</td></tr><tr><td>2016-08-19 15:07:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>205</td></tr><tr><td>2016-08-19 15:07:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>182</td></tr><tr><td>2016-08-19 15:07:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>31</td></tr><tr><td>2016-08-19 15:08:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1156</td></tr><tr><td>2016-08-19 15:08:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>628</td></tr><tr><td>2016-08-19 15:08:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>213</td></tr><tr><td>2016-08-19 15:08:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>192</td></tr><tr><td>2016-08-19 15:08:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>30</td></tr><tr><td>2016-08-19 15:09:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1235</td></tr><tr><td>2016-08-19 15:09:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>587</td></tr><tr><td>2016-08-19 15:09:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>210</td></tr><tr><td>2016-08-19 15:09:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>176</td></tr><tr><td>2016-08-19 15:09:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>31</td></tr><tr><td>2016-08-19 15:10:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1190</td></tr><tr><td>2016-08-19 15:10:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>649</td></tr><tr><td>2016-08-19 15:10:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>220</td></tr><tr><td>2016-08-19 15:10:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>185</td></tr><tr><td>2016-08-19 15:10:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>29</td></tr><tr><td>2016-08-19 15:11:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1266</td></tr><tr><td>2016-08-19 15:11:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>647</td></tr><tr><td>2016-08-19 15:11:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>208</td></tr><tr><td>2016-08-19 15:11:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>204</td></tr><tr><td>2016-08-19 15:11:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>35</td></tr><tr><td>2016-08-19 15:12:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1143</td></tr><tr><td>2016-08-19 15:12:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>646</td></tr><tr><td>2016-08-19 15:12:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>210</td></tr><tr><td>2016-08-19 15:12:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>200</td></tr><tr><td>2016-08-19 15:12:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>40</td></tr><tr><td>2016-08-19 15:13:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1208</td></tr><tr><td>2016-08-19 15:13:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>638</td></tr><tr><td>2016-08-19 15:13:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>237</td></tr><tr><td>2016-08-19 15:13:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>231</td></tr><tr><td>2016-08-19 15:13:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>30</td></tr><tr><td>2016-08-19 15:14:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1299</td></tr><tr><td>2016-08-19 15:14:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>628</td></tr><tr><td>2016-08-19 15:14:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>227</td></tr><tr><td>2016-08-19 15:14:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>221</td></tr><tr><td>2016-08-19 15:14:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>41</td></tr><tr><td>2016-08-19 15:15:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1259</td></tr><tr><td>2016-08-19 15:15:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>659</td></tr><tr><td>2016-08-19 15:15:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>220</td></tr><tr><td>2016-08-19 15:15:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>198</td></tr><tr><td>2016-08-19 15:15:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>24</td></tr><tr><td>2016-08-19 15:16:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1247</td></tr><tr><td>2016-08-19 15:16:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>660</td></tr><tr><td>2016-08-19 15:16:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>223</td></tr><tr><td>2016-08-19 15:16:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>200</td></tr><tr><td>2016-08-19 15:16:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>22</td></tr><tr><td>2016-08-19 15:17:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>1148</td></tr><tr><td>2016-08-19 15:17:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>569</td></tr><tr><td>2016-08-19 15:17:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>208</td></tr><tr><td>2016-08-19 15:17:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>185</td></tr><tr><td>2016-08-19 15:17:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>27</td></tr><tr><td>2016-08-19 15:18:00</td><td>/quote/v1/trend</td><td>/quote/v1/trend</td><td>149</td></tr><tr><td>2016-08-19 15:18:00</td><td>/quote/v1/kline</td><td>/quote/v1/kline</td><td>77</td></tr><tr><td>2016-08-19 15:18:00</td><td>/quote/v1/fundflow</td><td>/quote/v1/fundflow</td><td>27</td></tr><tr><td>2016-08-19 15:18:00</td><td>/quote/v1/sort</td><td>/quote/v1/sort</td><td>22</td></tr><tr><td>2016-08-19 15:18:00</td><td>/quote/v1/block/sort</td><td>/quote/v1/block/sort</td><td>3</td></tr></tbody></table>
        <button>下载</button>
        <script>
            $('button').on('click', function() {
                $('table').tableExport({
                    fileName:"实时日志",
                    type:'excel',
                    escape:false
                });
            })
        </script>
    </body>
    </html>
  • 相关阅读:
    服务器控件Repeater
    HeidiSQL无法连接Myql
    未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序搜索
    DISTINCT删除重复数据
    Makedown文件保存问题
    Makedown 本地图片问题
    vsftpd配置文件详解[转载]
    centos 本地yum源的搭建
    OpenOffice菜单乱码解决和linux下安装字体
    让secureCRT正确显示中文
  • 原文地址:https://www.cnblogs.com/jzm17173/p/5798364.html
Copyright © 2020-2023  润新知