精华内容
下载资源
问答
  • js网页表格导出excel文件代码是一款基于js实现的网页table表格导出Excel文件代码。
  • jQuery网页表格导出Excel文件是一款一键导出Excel文件表格代码。
  • jQuery网页表格导出Excel文件是一款一键导出Excel文件表格代码。
  • jQuery网页表格导出Excel文件是一款一键导出Excel文件表格代码。
  • 一个简单的 asp.net 网页内容导出excel文件的示例,欢迎下载!
  • js网页表格数据导出excel文件代码是一款基于js实现的网页table表格导出Excel文件代码。适用浏览器:360、FireFox、Chrome、Opera、傲游、搜狗、世界之窗. 不支持Safari、IE8及以下浏览器。 javascript
  • 下面小编就为大家带来一篇JavaWeb中导出excel文件的简单方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
  • jQuery表格导出excel文件代码是一款日程事件表格点击按钮一键导出excel表格文件,pdf文件,CSV表格效果,支持网页打印代码。
  • CookieUtil.add("downloaded","true",3600,response); String fileName = new String("******".getBytes("GBK"),"ISO-8859-1"); response.setContentType("application/x-xls; charset=gb2312");...

    <%

    CookieUtil.add("downloaded","true",3600,response);

    String fileName = new String("******".getBytes("GBK"),"ISO-8859-1");

    response.setContentType("application/x-xls; charset=gb2312");

    response.setHeader("Content-Disposition", "attachment;filename=" + fileName + ".xls");

    %>

    <html>

    <head>

    <style>

    .xlsText{mso-number-format:"\@"}

    </style>

    <head>

    <body>

    ....

    展开全文
  • 网页导出excel文件

    2014-03-04 15:16:30
    response.setContentType("application/vnd.ms-excel"); response.setHeader("content-disposition", "attachment; filename=" + new String(("xx_" + order.getId() + "_" + order.getOrderbbNumber() + ".xls").ge
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("content-disposition", "attachment; filename="
    + new String(("xx_" + order.getId() + "_" + order.getOrderbbNumber() + ".xls").getBytes("GBK"), "ISO8859_1"));


    导出为EXCEL 2003的xls文件。支持大部分主流浏览器。


    关于XLSX文件导出:

    摘自:http://www.codeproject.com/Questions/58380/Response-contentType-for-Excel-2007

    The content type for .xlsx files is;
    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


    上面的方法未测试。

    展开全文
  • 前言: ...jQuery表格导出Excel文件 先来看看我们的层级划分: 如图所示: demo.css 代码如下: body, html { font-size: 100%; padding: 0; margin: 0;} /* Reset */ *, *:after, *:before { -w...

    前言:

    我在这里给大家介绍一下我们能用代码实现的最简单的两种转换为Excel文件以及Word文档的方法。

    jQuery表格导出Excel文件

    先来看看我们的层级划分:
    如图所示:
    在这里插入图片描述
    demo.css
    代码如下:

    body, html { font-size: 100%; 	padding: 0; margin: 0;}
    
    /* Reset */
    *,
    *:after,
    *:before {
    	-webkit-box-sizing: border-box;
    	-moz-box-sizing: border-box;
    	box-sizing: border-box;
    }
    
    /* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
    .clearfix:before,
    .clearfix:after {
    	content: " ";
    	display: table;
    }
    
    .clearfix:after {
    	clear: both;
    }
    
    body{
    	font-family: "Microsoft YaHei","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif;
    }
    

    FileSaver.js
    代码如下:

    var saveAs=saveAs||"undefined"!==typeof navigator&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(a){"use strict";if("undefined"===typeof navigator||!/MSIE [1-9]\./.test(navigator.userAgent)){var k=a.document,n=k.createElementNS("http://www.w3.org/1999/xhtml","a"),w="download"in n,x=function(c){var e=k.createEvent("MouseEvents");e.initMouseEvent("click",!0,!1,a,0,0,0,0,0,!1,!1,!1,!1,0,null);c.dispatchEvent(e)},q=a.webkitRequestFileSystem,u=a.requestFileSystem||q||a.mozRequestFileSystem,
    y=function(c){(a.setImmediate||a.setTimeout)(function(){throw c;},0)},r=0,s=function(c){var e=function(){"string"===typeof c?(a.URL||a.webkitURL||a).revokeObjectURL(c):c.remove()};a.chrome?e():setTimeout(e,500)},t=function(c,a,d){a=[].concat(a);for(var b=a.length;b--;){var l=c["on"+a[b]];if("function"===typeof l)try{l.call(c,d||c)}catch(f){y(f)}}},m=function(c,e){var d=this,b=c.type,l=!1,f,p,k=function(){t(d,["writestart","progress","write","writeend"])},g=function(){if(l||!f)f=(a.URL||a.webkitURL||
    a).createObjectURL(c);p?p.location.href=f:void 0==a.open(f,"_blank")&&"undefined"!==typeof safari&&(a.location.href=f);d.readyState=d.DONE;k();s(f)},h=function(a){return function(){if(d.readyState!==d.DONE)return a.apply(this,arguments)}},m={create:!0,exclusive:!1},v;d.readyState=d.INIT;e||(e="download");if(w)f=(a.URL||a.webkitURL||a).createObjectURL(c),n.href=f,n.download=e,x(n),d.readyState=d.DONE,k(),s(f);else{a.chrome&&b&&"application/octet-stream"!==b&&(v=c.slice||c.webkitSlice,c=v.call(c,0,
    c.size,"application/octet-stream"),l=!0);q&&"download"!==e&&(e+=".download");if("application/octet-stream"===b||q)p=a;u?(r+=c.size,u(a.TEMPORARY,r,h(function(a){a.root.getDirectory("saved",m,h(function(a){var b=function(){a.getFile(e,m,h(function(a){a.createWriter(h(function(b){b.onwriteend=function(b){p.location.href=a.toURL();d.readyState=d.DONE;t(d,"writeend",b);s(a)};b.onerror=function(){var a=b.error;a.code!==a.ABORT_ERR&&g()};["writestart","progress","write","abort"].forEach(function(a){b["on"+
    a]=d["on"+a]});b.write(c);d.abort=function(){b.abort();d.readyState=d.DONE};d.readyState=d.WRITING}),g)}),g)};a.getFile(e,{create:!1},h(function(a){a.remove();b()}),h(function(a){a.code===a.NOT_FOUND_ERR?b():g()}))}),g)}),g)):g()}},b=m.prototype;b.abort=function(){this.readyState=this.DONE;t(this,"abort")};b.readyState=b.INIT=0;b.WRITING=1;b.DONE=2;b.error=b.onwritestart=b.onprogress=b.onwrite=b.onabort=b.onerror=b.onwriteend=null;return function(a,b){return new m(a,b)}}}("undefined"!==typeof self&&
    self||"undefined"!==typeof window&&window||this.content);"undefined"!==typeof module&&null!==module?module.exports=saveAs:"undefined"!==typeof define&&null!==define&&null!=define.amd&&define([],function(){return saveAs});
    

    demo.page.js
    代码如下:

    $(document).ready(function () {
        excel = new ExcelGen({
            "src_id": "test_table",
            "show_header": true
        });
        $("#generate-excel").click(function () {
            excel.generate();
        });
    });
    

    excel-gen.js
    代码如下:

    /*require jszip.js FileSaver.js jquery*/
    
    /* excel-gen.js
    
    Client-Side JavaScript Code for creating Excel Spreadsheet tables from HTML Tables
    Works on all browsers!!!!!
    
    ---------------
    - MIT License -
    ---------------
    Copyright 2018 ECSC, ltd.
    
    Permission is hereby granted, free of charge, to any person obtaining a copy of this 
    software and associated documentation files (the "Software"), to deal in the Software 
    without restriction, including without limitation the rights to use, copy, modify, 
    merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 
    permit persons to whom the Software is furnished to do so, subject to the following 
    conditions:
    
    The above copyright notice and this permission notice shall be included in all 
    copies or substantial portions of the Software.
    
    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
    INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
    PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
    CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
    OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    
    Author Paul Warren */
    
    //Initial XLSX Generation assumes default Workbook with sheet1, sheet2 and sheet3 inside.  Will upgrade to be more flexible in future releases.
    
    /**
    * Excel Generator.
    *
    * Creates .xlsx from HTML Table.
    *
    */
    function ExcelGen(options) {
        //internal access to this
        me = this;
    
        this.defaultOptions = {
            "src_id": "",
            "type": "table",
            "show_header": false,
            "header_row": null,
            "body_rows": null
        }
    
        this.options = {};
    
        this.col_count = 0;
        this.columns = [];
        this.headers = [];
        this.rows = [];
        this.srcElem;
    
        this.static_components = {
            "_rels": {
                ".rels": "PD94bWwgdmVyc2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iIFRhcmdldD0id29ya3NoZWV0cy9zaGVldDMueG1sIi8+PFJlbGF0aW9uc2hpcCBJZD0icklkMiIgVHlwZT0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL29mZmljZURvY3VtZW50LzIwMDYvcmVsYXRpb25zaGlwcy93b3Jrc2hlZXQiIFRhcmdldD0id29ya3NoZWV0cy9zaGVldDIueG1sIi8+PFJlbGF0aW9uc2hpcCBJZD0icklkMSIgVHlwZT0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL29mZmljZURvY3VtZW50LzIwMDYvcmVsYXRpb25zaGlwcy93b3Jrc2hlZXQiIFRhcmdldD0id29ya3NoZWV0cy9zaGVldDEueG1sIi8+PFJlbGF0aW9uc2hpcCBJZD0icklkNiIgVHlwZT0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL29mZmljZURvY3VtZW50LzIwMDYvcmVsYXRpb25zaGlwcy9zaGFyZWRTdHJpbmdzIiBUYXJnZXQ9InNoYXJlZFN0cmluZ3MueG1sIi8+PFJlbGF0aW9uc2hpcCBJZD0icklkNSIgVHlwZT0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL29mZmljZURvY3VtZW50LzIwMDYvcmVsYXRpb25zaGlwcy9zdHlsZXMiIFRhcmdldD0ic3R5bGVzLnhtbCIvPjxSZWxhdGlvbnNoaXAgSWQ9InJJZDQiIFR5cGU9Imh0dHA6Ly9zY2hlbWFzLm9wZW54bWxmb3JtYXRzLm9yZy9vZmZpY2VEb2N1bWVudC8yMDA2L3JlbGF0aW9uc2hpcHMvdGhlbWUiIFRhcmdldD0idGhlbWUvdGhlbWUxLnhtbCIvPjwvUmVsYXRpb25zaGlwcz4="
                },
                "theme": {
                    "theme1.xml": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pg0KPGE6dGhlbWUge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W1lbnQudGhlbWUreG1sIi8+PE92ZXJyaWRlIFBhcnROYW1lPSIveGwvc3R5bGVzLnhtbCIgQ29udGVudFR5cGU9ImFwcGxpY2F0aW9uL3ZuZC5vcGVueG1sZm9ybWF0cy1vZmZpY2Vkb2N1bWVudC5zcHJlYWRzaGVldG1sLnN0eWxlcyt4bWwiLz48T3ZlcnJpZGUgUGFydE5hbWU9Ii94bC9zaGFyZWRTdHJpbmdzLnhtbCIgQ29udGVudFR5cGU9ImFwcGxpY2F0aW9uL3ZuZC5vcGVueG1sZm9ybWF0cy1vZmZpY2Vkb2N1bWVudC5zcHJlYWRzaGVldG1sLnNoYXJlZFN0cmluZ3MreG1sIi8+PE92ZXJyaWRlIFBhcnROYW1lPSIveGwvdGFibGVzL3RhYmxlMS54bWwiIENvbnRlbnRUeXBlPSJhcHBsaWNhdGlvbi92bmQub3BlbnhtbGZvcm1hdHMtb2ZmaWNlZG9jdW1lbnQuc3ByZWFkc2hlZXRtbC50YWJsZSt4bWwiLz48T3ZlcnJpZGUgUGFydE5hbWU9Ii9kb2NQcm9wcy9jb3JlLnhtbCIgQ29udGVudFR5cGU9ImFwcGxpY2F0aW9uL3ZuZC5vcGVueG1sZm9ybWF0cy1wYWNrYWdlLmNvcmUtcHJvcGVydGllcyt4bWwiLz48T3ZlcnJpZGUgUGFydE5hbWU9Ii9kb2NQcm9wcy9hcHAueG1sIiBDb250ZW50VHlwZT0iYXBwbGljYXRpb24vdm5kLm9wZW54bWxmb3JtYXRzLW9mZmljZWRvY3VtZW50LmV4dGVuZGVkLXByb3BlcnRpZXMreG1sIi8+PC9UeXBlcz4="
        };
    
        this.static_pieces = {
            "xml_header": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pg=="
        };
    
        this.range = "";
    
        /**** XML GENERATORS ****/
    
        /**
         * Creates sharedStrings.xml file.
         * 
         * Excel files have a sharedStrings.xml, this file holds all of the strings
         * used in the Excel spreadsheet to reduce repeating data.
         */
        this.sharedStrings = {
            "xml": {
                //sst: {0} = count
                //sst: {1} = uniqueCount
                "open_sst": "PHNzdCB4bWxucz0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL3NwcmVhZHNoZWV0bWwvMjAwNi9tYWluIiBjb3VudD0iezB9IiB1bmlxdWVDb3VudD0iezF9Ij4=",
                "close_sst": "</sst>",
                //si: {0} = value
                "si": "<si><t>{0}</t></si>"
            },
            "count": 0,
            "vals": [],
            /**
             * Adds value to Cache if it is a string and isn't already included.
             *
             * @returns {sharedString Value Object}
             */
            "add": function (value) {
                if (isNaN(value)) {
                    this.count++;
                    if (this.vals.indexOf(value) === -1) {
                        this.vals.push(value);
                    }
                    return { "type": "shared", "value": this.vals.indexOf(value), "text": value };
                } else {
                    return { "type": "literal", "value": value, "text": value };
                }
            },
            /**
             * Creates sharedString.xml.
             */
            "to_xml": function () {
                out = [];
                out.push(atob(me.static_pieces.xml_header));
                out.push("\n");
                out.push(atob(this.xml.open_sst).format(this.count, this.vals.length));
                var si = this.xml.si;
                this.vals.forEach(function (v) {
                    out.push(si.format(v));
                });
                out.push(this.xml.close_sst);
                return out.join("");
            }
        };
    
        this.table = {
            "xml": {
                // table: {0} = ref
                "open_table": "PHRhYmxlIHhtbG5zPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvc3ByZWFkc2hlZXRtbC8yMDA2L21haW4iIGlkPSIxIiBuYW1lPSJUYWJsZTEiIGRpc3BsYXlOYW1lPSJUYWJsZTEiIHJlZj0iezB9IiB0b3RhbHNSb3dTaG93bj0iMCI+",
                "close_table": "</table>",
                //autoFilter: {0} = ref
                "autoFilter": "PGF1dG9GaWx0ZXIgcmVmPSJ7MH0iLz4=",
                //tableColumns: {0} = count
                "tableColumns": "PHRhYmxlQ29sdW1ucyBjb3VudD0iezB9Ij4=",
                //tableColumn: {0} = id
                //tableColumn: {1} = name
                "tableColumn": "PHRhYmxlQ29sdW1uIGlkPSJ7MH0iIG5hbWU9InsxfSIvPg==",
                "close_tableColumns": "</tableColumns>",
                "tableStyleInfo": "PHRhYmxlU3R5bGVJbmZvIG5hbWU9IlRhYmxlU3R5bGVNZWRpdW0yIiBzaG93Rmlyc3RDb2x1bW49IjAiIHNob3dMYXN0Q29sdW1uPSIwIiBzaG93Um93U3RyaXBlcz0iMSIgc2hvd0NvbHVtblN0cmlwZXM9IjAiLz4="
            },
            "to_xml": function () {
                var out = [];
                out.push(atob(me.static_pieces.xml_header));
                out.push("\n");
                out.push(atob(this.xml.open_table).format(me.range));
                out.push(atob(this.xml.autoFilter).format(me.range));
                out.push(atob(this.xml.tableColumns).format(me.headers.length));
                var tableColumn = atob(this.xml.tableColumn);
                me.headers.forEach(function (v, i) {
                    //First row has dataDxfId="0" in the sample leaving out incase
                    out.push(tableColumn.format((i + 1), v));
                });
                out.push(this.xml.close_tableColumns);
                out.push(atob(this.xml.tableStyleInfo));
                out.push(this.xml.close_table);
                return out.join("");
            }
        }
    
        this.sheet = {
            "xml": {
                //dimension: {0} = ref
                //selection: {1} = sqref
                "start": "PHdvcmtzaGVldCB4bWxucz0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL3NwcmVhZHNoZWV0bWwvMjAwNi9tYWluIiB4bWxuczpyPSJodHRwOi8vc2NoZW1hcy5vcGVueG1sZm9ybWF0cy5vcmcvb2ZmaWNlRG9jdW1lbnQvMjAwNi9yZWxhdGlvbnNoaXBzIiB4bWxuczptYz0iaHR0cDovL3NjaGVtYXMub3BlbnhtbGZvcm1hdHMub3JnL21hcmt1cC1jb21wYXRpYmlsaXR5LzIwMDYiIG1jOklnbm9yYWJsZT0ieDE0YWMiIHhtbG5zOngxNGFjPSJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL29mZmljZS9zcHJlYWRzaGVldG1sLzIwMDkvOS9hYyI+PGRpbWVuc2lvbiByZWY9InswfSIvPjxzaGVldFZpZXdzPjxzaGVldFZpZXcgdGFiU2VsZWN0ZWQ9IjEiIHdvcmtib29rVmlld0lkPSIwIj48c2VsZWN0aW9uIHNxcmVmPSJ7MX0iLz48L3NoZWV0Vmlldz48L3NoZWV0Vmlld3M+PHNoZWV0Rm9ybWF0UHIgZGVmYXVsdFJvd0hlaWdodD0iMTUiIHgxNGFjOmR5RGVzY2VudD0iMC4yYiIvPg==",
                "margins": "PHBhZ2VNYXJnaW5zIGxlZnQ9IjAuNyIgcmlnaHQ9IjAuNyIgdG9wPSIwLjc1IiBib3R0b209IjAuNzUiIGhlYWRlcj0iMC4zIiBmb290ZXI9IjAuMyIvPg==",
                //row: {0} = r
                //row: {1} = spans
                "row": "PHJvdyByPSJ7MH0iIHNwYW5zPSJ7MX0iIHgxNGFjOmR5RGVzY2VudD0iMC4yNSI+",
                "close_row": "</row>",
                //cell: {0} = r
                //cell: {1} = cell value
                "cell": "PGMgcj0iezB9IiBzPSIxIj48dj57MX08L3Y+PC9jPg==",
                "shared_cell": "PGMgcj0iezB9IiBzPSIxIiB0PSJzIj48dj57MX08L3Y+PC9jPg==",
                "table": "PHRhYmxlUGFydHMgY291bnQ9IjEiPjx0YWJsZVBhcnQgcjppZD0icklkMSIvPjwvdGFibGVQYXJ0cz4=",
                //col: {0} = min
                //col: {1} = max
                //col: {2} = width
                "col": "PGNvbCBtaW49InswfSIgbWF4PSJ7MX0iIHdpZHRoPSJ7Mn0iIGN1c3RvbVdpZHRoPSIxIi8+",
                "open_cols": "<cols>",
                "close_cols": "</cols>",
                "open_sd": "<sheetData>",
                "close_sd": "</sheetData>",
                "end": "</worksheet>"
            },
            "rows": [],
            "is_table": true,
            "to_xml": function () {
                //generate the beginning xml of the sheet
                front = [];
                front.push(atob(me.static_pieces.xml_header));
                front.push("\n");
                me.range = me.__column_number__(1) + "1:" + me.__column_number__(this.rows[0].length) + this.rows.length;
                front.push(atob(this.xml.start).format(me.range, me.range));
    
                data = [];
    
                data.push(this.xml.open_sd);
                var spans = "1:" + this.rows[0].length;
                var colWidths = {};
                var row = atob(this.xml.row);
                var cell = atob(this.xml.cell);
                var shared_cell = atob(this.xml.shared_cell);
    
                ot = this;
                this.rows.forEach(function (v, i) {
                    data.push(row.format((i + 1), spans));
                    v.forEach(function (c, j) {
                        if (c.type === "shared") {
                            data.push(shared_cell.format((me.__column_number__(j + 1) + "" + (i + 1)), c.value));
                        } else {
                            data.push(cell.format((me.__column_number__(j + 1) + "" + (i + 1)), c.value));
                        }
                        colWidths[j] = (!colWidths[j] || (c.text.length + 5) > colWidths[j]) ? c.text.length + 5 : colWidths[j];
                    });
                    data.push(ot.xml.close_row);
                });
    
                data.push(this.xml.close_sd);
                data.push(atob(this.xml.margins));
                if (this.is_table) {
                    data.push(atob(this.xml.table));
                }
                data.push(this.xml.end);
    
                cols = [];
                col = atob(this.xml.col);
                cols.push(this.xml.open_cols);
                for (var key in colWidths) {
                    v = parseInt(key) + 1;
                    //in my sample first column has style=1 didn't do it here.
                    cols.push(col.format(v, v, colWidths[key]));
                }
                cols.push(this.xml.close_cols);
    
                return front.join("") + cols.join("") + data.join("");
            }
        };
    
        /*
        helpers
        */
        this.__column_number__ = function (val) {
            for (var out = '', a = 1, b = 26; (val -= a) >= 0; a = b, b *= 26) {
                out = String.fromCharCode(parseInt((val % b) / a) + 65) + out;
            }
            return out;
        };
    
    	String.prototype.format = function () {
    		return (function (a, t) { return t.replace(/\{(\d+)\}/g, function (_, i) { return a[~ ~i] }) })(arguments, this);
    	};
    
    	/**
    	 *    Extension of JQuery Library for getting either the text or the value out of child elements.
    	 *
    	 *    Looks at the children elements, if it finds select or input tag, 
    	 *    it returns the value, otherwise it returns the text of the element.
    	 */
    	jQuery.fn.extend({
    	  "textOrValue": function () {
    		var t = this.find("select, input");
    		return (t.length) ? t.val():this.text();
    	  }
    	});
    
        /**
         * Basic internal initialization.
         */
        this.__initialize__ = function (options) {
            this.options = $.extend(this.defaultOptions, options);
            this.__readHTMLTable__();
        };
    
        this.__readHTMLTable__ = function () {
            //setup HTML input
            if (this.options.src_id) {
                var table = $("#" + this.options.src_id);
                if ((table.length) && (table.prop("tagName") == "TABLE")) {
                    var skipFirst = false;
                    if ((!this.options.header_row) && (this.options.show_header)) {
                        if (table.has("thead").length) {
                            this.options.header_row = table.find("thead tr:nth-child(1)")
                        } else {
                            this.options.header_row = table.find("tr:nth-child(1)")
                            skipFirst = true;
                        }
                        this.col_count = this.options.header_row.length;
                    }
                    if (!this.options.body_rows) {
                        if (table.has("tbody").length) {
                            this.options.body_rows = (skipFirst) ? table.find("tbody tr").not(":first") : table.find("tbody tr");
                        } else {
                            this.options.body_rows = (skipFirst) ? table.find("tr").not(":first") : table.find("tr");
                        }
                        this.col_count = (this.col_count === 0) ? this.options.body_rows[0].length : this.col_count;
                    }
                }
            }
            //process header if it exists
            if (this.options.header_row) {
                var row = [];
                var outerThis = this;
                this.options.header_row.children("th,td").each(function () {
                    //header text gets stored for table
                    var txt = $(this).textOrValue().trim().replace(/ +(?= )/g, '');
                    outerThis.headers.push(txt);
                    row.push(outerThis.sharedStrings.add(txt));
                });
                this.sheet.rows.push(row);
            }
            //process content
            if (this.options.body_rows) {
                this.options.body_rows.each(function () {
                    var row = [];
                    $(this).children("td").each(function () {
                        row.push(outerThis.sharedStrings.add($(this).textOrValue().trim().replace(/ +(?= )/g, '')));
                    });
                    outerThis.sheet.rows.push(row);
                });
            }
        };
    
        this.__blank__ = function () {
    
            var zip = new JSZip(), _rels = zip.folder("_rels"), doc = zip.folder("docProps"), xl = zip.folder("xl");
            _rels.file(".rels", atob(this.static_components._rels[".rels"]));
            doc.file("app.xml", atob(this.static_components.docProps["app.xml"]));
            doc.file("core.xml", atob(this.static_components.docProps["core.xml"]));
            zip.file("[Content_Types].xml", atob(this.static_components.ContentTypes));
            xl_rels = xl.folder("_rels");
            xl_theme = xl.folder("theme");
            xl_tables = xl.folder("tables");
            xl_worksheets = xl.folder("worksheets");
            if (this.options.type === "table") {
                var xl_ws_rels = xl_worksheets.folder("_rels");
                xl_ws_rels.file("sheet1.xml.rels", atob(this.static_components.xl.worksheets._rels));
            }
            //sheet2 and sheet3 shall be blank at this time
            xl_worksheets.file("sheet2.xml", atob(this.static_components.xl.worksheets.blank_sheet));
            xl_worksheets.file("sheet3.xml", atob(this.static_components.xl.worksheets.blank_sheet));
            xl_rels.file("workbook.xml.rels", atob(this.static_components.xl._rels["workbook.xml.rels"]));
            xl_theme.file("theme1.xml", atob(this.static_components.xl.theme["theme1.xml"]));
            xl.file("styles.xml", atob(this.static_components.xl["styles.xml"]));
            xl.file("workbook.xml", atob(this.static_components.xl["workbook.xml"]));
            return {
                "base": zip,
                "xl": xl,
                "tables": xl_tables,
                "worksheets": xl_worksheets
            };
    
        }
    
        this.generate = function () {
            var workbook = this.__blank__();
            workbook.worksheets.file("sheet1.xml", this.sheet.to_xml());
            workbook.xl.file("sharedStrings.xml", this.sharedStrings.to_xml());
            workbook.tables.file("table1.xml", this.table.to_xml());
            workbook.base.generateAsync({ type: "blob" })
                .then(function (content) {
                    saveAs(content, "example.xlsx");
                });
        };
    
    
        //initialize the object
        this.__initialize__(options);
    
    };
    

    然后我们来看一下我们的jsp界面
    Excle.jsp
    代码如下:

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>jQuery网页表格导出Excel文件</title>
    
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css">
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
    
    <link rel="stylesheet" type="text/css" href="css/demo.css">
    
    </head>
    <body>
    
    <div class="container">
    	<div class="row">
    		<div class="col-md-3" style="padding:2em 0;">
    			<button type="button" class="btn btn-success btn-block" id="generate-excel"><i class="fa fa-file-excel-o" aria-hidden="true"></i> 将表格转换为Excel</button>
    		</div>
    		<div class="col-md-12" style="padding:2em 0;">
    			<div class="table-responsive">
    			<table class="table table-bordered table-striped" id="test_table">
    				<thead>
    				  <tr>
    					<td>班级</td>
    					<td>姓名</td>
    					<td>年龄</td>
    					<td>性别</td>
    					<td>地址</td>
    					<td>手机号</td>
    				  </tr>
    				</thead>
    				<tbody>
    				  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李</span>
    							</td>
    							<td>
    								<span>18</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    						  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李1</span>
    							</td>
    							<td>
    								<span>19</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    						  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李2</span>
    							</td>
    							<td>
    								<span>20</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    						  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李3</span>
    							</td>
    							<td>
    								<span>18</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    						  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李4</span>
    							</td>
    							<td>
    								<span>18</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    						  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李5</span>
    							</td>
    							<td>
    								<span>18</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    						  <tr>
    							<td>
    								<span>T226</span>
    							</td>
    							<td>
    								<span>小李6</span>
    							</td>
    							<td>
    								<span>18</span>
    							</td>
    							<td>
    								<span>男</span>
    							</td>
    							<td>
    								<span>梅溪湖</span>
    							</td>
    							<td>
    								<span>12378349323</span>
    							</td>
    						</tr>
    				</tbody>
    			  </table>
    			</div>
    		</div>
    	</div>
    </div>
    
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/jszip/3.1.5/jszip.min.js"></script>
    <script type="text/javascript" src="external/FileSaver.js"></script>
    <script type="text/javascript" src="scripts/excel-gen.js"></script>
    <script type="text/javascript" src="scripts/demo.page.js"></script>
    
    </body>
    </html>
    

    效果如图所示:
    在这里插入图片描述
    在这里插入图片描述

    网页内容导出Word文档

    同样的我们来看一下我们的层级结构(架包报错是正常现象,不影响效果)
    如图所示:
    在这里插入图片描述
    demo.css
    代码如下:

    @charset "utf-8";
    /*框架预览 CSS*/
    .mkeBody{ background:#121212;}
    .mkeHeadBox{ padding: 30px 10px; text-overflow: ellipsis; white-space: nowrap; margin: 0; color: #fff; text-align: center; overflow: hidden; border-bottom: 3px solid #666; box-shadow: inset 0 -2px 3px #000000; letter-spacing: 1px; font: 26px/26px "微软雅黑"; }
    .mkeFooterBox{ padding: 25px 10px; text-overflow: ellipsis; margin: 0; color: #fff; font-size: 14px; line-height: 24px; text-align: center; overflow: hidden; border-top: 3px solid #666; box-shadow: inset 0 2px 3px #000000; }
    .mkeContentBox{ background:#494A5F; padding:50px}
    .mkeContentBox:after{height:0; clear:both;}
    .mkeFooterBox p,.mkeFooterBox div{padding:0; margin:0; line-height:26px; font-size:14px;}
    .mkeFooterBox a{color:#fff; white-space:nowrap}
    .mkeButton{background:#F36; display:inline-block; text-decoration:none; width:102px; border-radius:0.3em; transition:all 0.3s ease}
    .mkeButton:hover{ background: #FF1550; }
    .mkeURL{font-size:24px;}
    .mkeFooterBox .mKeBannerAD{ width: 728px; height: 90px; margin: 18px auto 0; }
    .mkeFooterBox .mSmallKeBannerAD{display:none;}
    @media only screen and (max-width:900px){
    .mkeButton {display:block; margin:8px auto 0;}
    }
    @media only screen and (max-width:767px){
    .mkeHeadBox{font-size:18px; padding:15px 10px;}
    .mkeFooterBox p,.mkeFooterBox div{ line-height:24px; font-size:12px;}
    .mkeURL{font-size:22px;}
    .mkeFooterBox .mKeBannerAD{display:none;}
    .mkeFooterBox .mSmallKeBannerAD{width:300px; height:250px; margin:18px auto 0; display:block;}
    }
    /*End*/
    
    /*主要CSS*/
    body, html { font-size: 100%; 	padding: 0; margin: 0;}
    
    /* Reset */
    *,
    *:after,
    *:before {
    	-webkit-box-sizing: border-box;
    	-moz-box-sizing: border-box;
    	box-sizing: border-box;
    }
    
    /* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
    .clearfix:before,
    .clearfix:after {
    	content: " ";
    	display: table;
    }
    
    .clearfix:after {
    	clear: both;
    }
    
    body{
    	background: #494A5F;
    	color: #D5D6E2;
    	font-weight: 500;
    	font-size: 1.05em;
    	font-family: "Microsoft YaHei","宋体","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif, FreeSans, Arimo;
    }
    a{ color: rgba(255, 255, 255, 0.6);outline: none;text-decoration: none;-webkit-transition: 0.2s;transition: 0.2s;}
    a:hover,a:focus{color:#74777b;text-decoration: none;}
    .word-icon{
    	font-family: "Helvetica", sans-serif;
        font-size: 24px;
        font-weight: bold;
        background-color: #0054a6;
        color: white;
        padding: 2px 5px;
        vertical-align: middle;
    }
    

    FileSaver.js
    代码如下:

    /* FileSaver.js
     * A saveAs() FileSaver implementation.
     * 1.3.2
     * 2016-06-16 18:25:19
     *
     * By Eli Grey, http://eligrey.com
     * License: MIT
     *   See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
     */
    
    /*global self */
    /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
    
    /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
    
    var saveAs = saveAs || (function(view) {
    	"use strict";
    	// IE <10 is explicitly unsupported
    	if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
    		return;
    	}
    	var
    		  doc = view.document
    		  // only get URL when necessary in case Blob.js hasn't overridden it yet
    		, get_URL = function() {
    			return view.URL || view.webkitURL || view;
    		}
    		, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
    		, can_use_save_link = "download" in save_link
    		, click = function(node) {
    			var event = new MouseEvent("click");
    			node.dispatchEvent(event);
    		}
    		, is_safari = /constructor/i.test(view.HTMLElement)
    		, is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent)
    		, throw_outside = function(ex) {
    			(view.setImmediate || view.setTimeout)(function() {
    				throw ex;
    			}, 0);
    		}
    		, force_saveable_type = "application/octet-stream"
    		// the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to
    		, arbitrary_revoke_timeout = 1000 * 40 // in ms
    		, revoke = function(file) {
    			var revoker = function() {
    				if (typeof file === "string") { // file is an object URL
    					get_URL().revokeObjectURL(file);
    				} else { // file is a File
    					file.remove();
    				}
    			};
    			setTimeout(revoker, arbitrary_revoke_timeout);
    		}
    		, dispatch = function(filesaver, event_types, event) {
    			event_types = [].concat(event_types);
    			var i = event_types.length;
    			while (i--) {
    				var listener = filesaver["on" + event_types[i]];
    				if (typeof listener === "function") {
    					try {
    						listener.call(filesaver, event || filesaver);
    					} catch (ex) {
    						throw_outside(ex);
    					}
    				}
    			}
    		}
    		, auto_bom = function(blob) {
    			// prepend BOM for UTF-8 XML and text/* types (including HTML)
    			// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
    			if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
    				return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type});
    			}
    			return blob;
    		}
    		, FileSaver = function(blob, name, no_auto_bom) {
    			if (!no_auto_bom) {
    				blob = auto_bom(blob);
    			}
    			// First try a.download, then web filesystem, then object URLs
    			var
    				  filesaver = this
    				, type = blob.type
    				, force = type === force_saveable_type
    				, object_url
    				, dispatch_all = function() {
    					dispatch(filesaver, "writestart progress write writeend".split(" "));
    				}
    				// on any filesys errors revert to saving with object URLs
    				, fs_error = function() {
    					if ((is_chrome_ios || (force && is_safari)) && view.FileReader) {
    						// Safari doesn't allow downloading of blob urls
    						var reader = new FileReader();
    						reader.onloadend = function() {
    							var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;');
    							var popup = view.open(url, '_blank');
    							if(!popup) view.location.href = url;
    							url=undefined; // release reference before dispatching
    							filesaver.readyState = filesaver.DONE;
    							dispatch_all();
    						};
    						reader.readAsDataURL(blob);
    						filesaver.readyState = filesaver.INIT;
    						return;
    					}
    					// don't create more object URLs than needed
    					if (!object_url) {
    						object_url = get_URL().createObjectURL(blob);
    					}
    					if (force) {
    						view.location.href = object_url;
    					} else {
    						var opened = view.open(object_url, "_blank");
    						if (!opened) {
    							// Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html
    							view.location.href = object_url;
    						}
    					}
    					filesaver.readyState = filesaver.DONE;
    					dispatch_all();
    					revoke(object_url);
    				}
    			;
    			filesaver.readyState = filesaver.INIT;
    
    			if (can_use_save_link) {
    				object_url = get_URL().createObjectURL(blob);
    				setTimeout(function() {
    					save_link.href = object_url;
    					save_link.download = name;
    					click(save_link);
    					dispatch_all();
    					revoke(object_url);
    					filesaver.readyState = filesaver.DONE;
    				});
    				return;
    			}
    
    			fs_error();
    		}
    		, FS_proto = FileSaver.prototype
    		, saveAs = function(blob, name, no_auto_bom) {
    			return new FileSaver(blob, name || blob.name || "download", no_auto_bom);
    		}
    	;
    	// IE 10+ (native saveAs)
    	if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
    		return function(blob, name, no_auto_bom) {
    			name = name || blob.name || "download";
    
    			if (!no_auto_bom) {
    				blob = auto_bom(blob);
    			}
    			return navigator.msSaveOrOpenBlob(blob, name);
    		};
    	}
    
    	FS_proto.abort = function(){};
    	FS_proto.readyState = FS_proto.INIT = 0;
    	FS_proto.WRITING = 1;
    	FS_proto.DONE = 2;
    
    	FS_proto.error =
    	FS_proto.onwritestart =
    	FS_proto.onprogress =
    	FS_proto.onwrite =
    	FS_proto.onabort =
    	FS_proto.onerror =
    	FS_proto.onwriteend =
    		null;
    
    	return saveAs;
    }(
    	   typeof self !== "undefined" && self
    	|| typeof window !== "undefined" && window
    	|| this.content
    ));
    // `self` is undefined in Firefox for Android content script context
    // while `this` is nsIContentFrameMessageManager
    // with an attribute `content` that corresponds to the window
    
    if (typeof module !== "undefined" && module.exports) {
      module.exports.saveAs = saveAs;
    } else if ((typeof define !== "undefined" && define !== null) && (define.amd !== null)) {
      define([], function() {
        return saveAs;
      });
    }
    
    

    然后我们来看一下我们的jsp页面
    Word.jsp
    代码如下:

    <%@ page language="java" contentType="text/html; charset=UTF-8"
        pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>将网页内容导出Word文档jQuery插件</title>
    <link rel="stylesheet" type="text/css" href="css/demo.css">
    </head>
    <body class="mkeBody">
    <div class="mkeHeadBox">将网页内容导出Word文档jQuery插件</div>
    <div class="mkeContentBox">
    <!--效果html开始-->
    <div class="container">
    	<div class="row">
    		<div class="col-md-9" id="pagecontent">
    			<h3>科比自传</h3>			
    			无论你走在任何大街小巷,只要有篮球的出现,便一定会有这个人的名字紧随其后,因为他与篮球之神迈克尔。乔丹已经毫无疑问的成为了当今篮球的象征,因为他的出现,篮球才会再一次变得神乎其神。他桀骜不驯的镜头成了永恒的代表;他无数次带伤上阵的画面成了无数人的赞佩对像;他一次次在球队最危险的时候靠自己的如火纯清的篮球技术解救球队的画面成为千千万万观众津津乐道的事件,他就是一个永不言败的人——科比。布莱恩特。
    
      科比出生在美国一个普通家庭,他小时候就深受篮球的熏陶,他的父亲也是一名篮球运动员以及教练。科比在高中的时候便展现了无限的潜力,他也为自己出色的表现直接进入NBA,要知道,那一年,他才17岁。此后他与奥尼尔的”OK”组合叱咤风云,一举取得三连冠,但随后的两年低谷也让这位天才球员愈发成熟,终于在09-10赛季,他带领着整个湖人取得了两连冠,他再一次证明了自己的强大,也让整个湖人为之闪闪发光……
    
      当你看完科比的这些简历,你可能会羡慕他所拥有的那些常人梦寐以求的东西——花不完的美元、无数的闪光灯和百年难道一见的天赋,这些都是人们打拼几年、十几年乃至一生都难以获得的东西,但你是否知道这些闪光灯背后是无数汗水所凝结的呢?科比一天要训练六个小时,投进两千个球,外加五百次罚篮和五百次三分,当你通过慢镜头所留下的那双难看甚至已经变形的手,他已经告诉了我们成功的答案,那就是训练、训练、再训练,因为只有你在背后付出的越多,那么你所收获的便也越多——不论是什么,一切都是成完美的正比例,没有任何的运气,努力,方改变一切……
    
      科比在苦苦训练只为那“台上十分钟,台下十年功”的时候,也可能会遭受到那职业运动巨大负荷所带来的心灵上以及肉体上的巨大伤害。有人曾经拿过一张示意图来分析科比的受伤地方与没受伤地方做比较,结果令人大吃一惊,科比仅有左手和左脚腕没受伤,其他的每一处受伤都足以让一个运动员告别他的篮球殿堂,我们在庆幸科比幸运的时刻,我们也在为这个老男人心疼,在这个高手如林的世界里,他用他的坚持、勇敢在脱颖而出,为了这份运动,他不惜把自己的生命作为了抵押而去为这个篮球的世界贡献自己的一份力量,这份力量虽然不能强大到掀翻这个世界,但我相信,他足以打破美国篮球史上的传奇历程,足以惊起NBA的惊涛骇浪,我想,如果他不是凭借这样一种像黑曼巴一样的毅力,他是绝对取得不了如此伟大的成就,这一切的伟大取决于这位英雄内心最深处的咆哮与怒吼……
    
      科比的精神委实让我们深深折服,但是当今国泰民安的盛世中又有几个人能有如此伟大的精神呢?一个个孩子吃不得半点的苦,天天在家里如“小皇帝”、“小公主”一般的受宠着,似乎他们的嘴巴一张,那一个个的外婆外公、爷爷奶奶、爸爸妈妈们便蜂拥而至的,每一个都蓄势待发,似乎随时听候着调遣,这是一种多么可悲的画面?难道所谓的中华民族的优秀品质早已全然无影了吗?那我们那些烈士们所用鲜血染红的五星红旗又将何去何从?那人心的泯灭是否又会使这个刚刚苏醒的巨龙再一次受到外来入侵者的枪林弹雨?不!绝对不可以!我们已经在那因为过度自满的清朝尝到了寄人篱下的感觉,我们,中国人现在已经足以强大!但是军事的强大是次要的,最重要的,是人人都怀揣着那颗为了自己的梦想,为了自己祖国,为了自己最崇高的理念所奋斗!拼搏!我们要学习科比,要学习黑曼巴,那种锲而不舍,那种持之以恒,那种无论什么时候,只要球队,只要国家需要我,我必将勇往直前!即使我受着再大的伤害,我那颗时时刻刻为报效的五星红旗依旧冉冉而升!这就是我们中国人骨子里的强大!这就是民族之魂魄!让我们这些祖国的花朵见见风雨吧!我们需要那狂风暴雨过后灿烂的彩虹!怒吼吧!黑曼巴!咆哮吧!科比!撕裂吧!我中华的少年们……
    
      现在,当你看到科比无与伦比的球技时,你还会再一味的看待这篮球运动员以及篮球的表面吗?我想,你会慢慢沉默的,因为,不光是科比,不光是你,也不光是我,我们都追逐着自己的梦想,我们都为自己的梦想付出汗水,但我想,无论取得多么大的成就,请你记住,当国家需要你的时候,我希望你无论如何都要挺身而出,不仅仅因为科比的“科比精神”,更多的,是源自于一个中华儿女的炽热内心……
    
      科比,世界人已看到你永垂不朽,那是科比精神最终的渲染内容
    		</div>
    		<div class="col-md-3">
    			<a class="btn btn-default jquery-word-export" href="javascript:void(0)" style="color: aqua">
    					<span class="word-icon">W</span>
    					导出为.doc文档
    				 </a>
    		</div>
    	</div>
    </div>
    
    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script type="text/javascript" src="js/FileSaver.js"></script>
    <script type="text/javascript" src="js/jquery.wordexport.js"></script>
    
    <script type="text/javascript">
    jQuery(document).ready(function($) {
    	$("a.jquery-word-export").click(function(event) {
    		$("#pagecontent").wordExport();
    	});
    });
    </script>
    
    </body>
    </html>
    
    

    效果如图所示:
    在这里插入图片描述
    在这里插入图片描述
    谢谢大家,多多指教!!!

    展开全文
  • string fileRpath = Server.MapPath("/HH_Download/Excel/zkExcel/") + DateTime.Now.ToString("yyyyMMddHHssmm")+".xls"; ExcelHelper.TableToExcel(dt1, fileRpath); Response.ClearHeaders(); Response.Clear...
     protected void btnExport_Click(object sender, EventArgs e)
            {
                try
                {
                    string where = GetWhere();
                    string sql = "select zkNum as 稿件编号,tittle as 稿件标题,authors as 作者,dws as 单位,phone as 电话,email as 邮箱,(zkNum + '-' + tittle) as Word文档,note as 备注 from tb_Zkzgqs where 1=1 " + where;
                    DataTable dt1 = dal.GetDataBySql(sql);
                    if (dt1 == null || dt1.Rows.Count == 0)
                    {
                        Response.Write("<script>alert('增刊不存在,不能导出!')</script>");
                    }
                    else
                    {
    
                        string fileRpath = Server.MapPath("/HH_Download/Excel/zkExcel/") + DateTime.Now.ToString("yyyyMMddHHssmm")+".xls";
                        ExcelHelper.TableToExcel(dt1, fileRpath);
                        Response.ClearHeaders();
                        Response.Clear();
                        Response.Expires = 0;
                        Response.Buffer = true;
                        Response.AddHeader("Accept-Language", "zh-tw");
                        string name = System.IO.Path.GetFileName(fileRpath);
    
    
                        FileStream files = new FileStream(fileRpath, FileMode.Open, FileAccess.Read, FileShare.Read);
                        byte[] byteFile = null;
                        if (files.Length == 0)
                        {
                            byteFile = new byte[1];
                        }
                        else
                        {
                            byteFile = new byte[files.Length];
                        }
                        files.Read(byteFile, 0, (int)byteFile.Length);
                        files.Close();
                        
                        Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("增刊稿件列表.xls", System.Text.Encoding.UTF8));
                        Response.ContentType = "application/octet-stream;charset=gbk";
                        Response.BinaryWrite(byteFile);
                       // Response.End();
                        ;
                    }
                }
                catch(Exception ex)
                {
                    throw ex;
                }
                
                
            }

    涉及的导出帮助类ExcelHelper  注意引用npoi

    public static class ExcelHelper
        {
            #region 私有方法
    
            /// <summary>
            /// Excel导入成Datable
            /// </summary>
            /// <param name="file">导入路径(包含文件名与扩展名)</param>
            /// <returns></returns>
            public static DataTable ExcelToTable(string file)
            {
                DataTable dt = new DataTable();
                IWorkbook workbook;
                string fileExt = Path.GetExtension(file).ToLower();
                using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read))
                {
                    //XSSFWorkbook 适用XLSX格式,HSSFWorkbook 适用XLS格式
                    if (fileExt == ".xlsx") { workbook = new XSSFWorkbook(fs); } else if (fileExt == ".xls") { workbook = new HSSFWorkbook(fs); } else { workbook = null; }
                    if (workbook == null) { return null; }
                    ISheet sheet = workbook.GetSheetAt(0);
    
                    //表头  
                    IRow header = sheet.GetRow(sheet.FirstRowNum);
                    List<int> columns = new List<int>();
                    for (int i = 0; i < header.LastCellNum; i++)
                    {
                        object obj = GetValueType(header.GetCell(i));
                        if (obj == null || obj.ToString() == string.Empty)
                        {
                            dt.Columns.Add(new DataColumn("Columns" + i.ToString()));
                        }
                        else
                            dt.Columns.Add(new DataColumn(obj.ToString()));
                        columns.Add(i);
                    }
                    //数据  
                    for (int i = sheet.FirstRowNum + 1; i <= sheet.LastRowNum; i++)
                    {
                        DataRow dr = dt.NewRow();
                        bool hasValue = false;
                        foreach (int j in columns)
                        {
                            dr[j] = GetValueType(sheet.GetRow(i).GetCell(j));
                            if (dr[j] != null && dr[j].ToString() != string.Empty)
                            {
                                hasValue = true;
                            }
                        }
                        if (hasValue)
                        {
                            dt.Rows.Add(dr);
                        }
                    }
                }
                return dt;
            }
    
            public static DataSet ExcelToDataSet(string file)
            {
                DataSet ds = new DataSet();
               // DataTable dt = new DataTable();
                IWorkbook workbook;
                string fileExt = Path.GetExtension(file).ToLower();
                using (FileStream fs = new FileStream(file, FileMode.Open, FileAccess.Read))
                {
                    //XSSFWorkbook 适用XLSX格式,HSSFWorkbook 适用XLS格式
                    if (fileExt == ".xlsx") { workbook = new XSSFWorkbook(fs); } else if (fileExt == ".xls") { workbook = new HSSFWorkbook(fs); } else { workbook = null; }
                    if (workbook == null) { return null; }
                    DataTable[] dts = new DataTable[workbook.NumberOfSheets];
                    dts[0] = new DataTable();
                    dts[1] = new DataTable();
                    for (int j = 0; j < workbook.NumberOfSheets; j++)
                    {
                        ISheet sheet = workbook.GetSheetAt(j);
                        IRow header = sheet.GetRow(sheet.FirstRowNum);
                        List<int> columns = new List<int>();
                        for (int i = 0; i < header.LastCellNum; i++)
                        {
                            object obj = GetValueType(header.GetCell(i));
                            if (obj == null || obj.ToString() == string.Empty)
                            {
                                dts[j].Columns.Add(new DataColumn("Columns" + i.ToString()));
                            }
                            else
                                dts[j].Columns.Add(new DataColumn(obj.ToString()));
                            columns.Add(i);
                        }
                        //数据  
                        for (int i = sheet.FirstRowNum + 1; i <= sheet.LastRowNum; i++)
                        {
                            DataRow dr = dts[j].NewRow();
                            bool hasValue = false;
                            foreach (int k in columns)
                            {
                                dr[k] = GetValueType(sheet.GetRow(i).GetCell(k));
                                if (dr[k] != null && dr[k].ToString() != string.Empty)
                                {
                                    hasValue = true;
                                }
                            }
                            if (hasValue)
                            {
                                dts[j].Rows.Add(dr);
                            }
                        }
                        
                        ds.Tables.Add(dts[j]);
                    }
                    //ISheet sheet = workbook.GetSheetAt(0);
    
                    //表头  
                    
                }
                return ds;
            }
    
            /// <summary>
            /// Datable导出成Excel
            /// </summary>
            /// <param name="dt"></param>
            /// <param name="file">导出路径(包括文件名与扩展名)</param>
            public static void TableToExcel(DataTable dt, string file)
            {
                IWorkbook workbook;
                string fileExt = Path.GetExtension(file).ToLower();
                if (fileExt == ".xlsx") { workbook = new XSSFWorkbook(); } else if (fileExt == ".xls") { workbook = new HSSFWorkbook(); } else { workbook = null; }
                if (workbook == null) { return; }
                ISheet sheet = string.IsNullOrEmpty(dt.TableName) ? workbook.CreateSheet("Sheet1") : workbook.CreateSheet(dt.TableName);
    
                //表头  
                IRow row = sheet.CreateRow(0);
                for (int i = 0; i < dt.Columns.Count; i++)
                {
                    ICell cell = row.CreateCell(i);
                    cell.SetCellValue(dt.Columns[i].ColumnName);
                }
    
                //数据  
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    IRow row1 = sheet.CreateRow(i + 1);
                    for (int j = 0; j < dt.Columns.Count; j++)
                    {
                        ICell cell = row1.CreateCell(j);
                        cell.SetCellValue(dt.Rows[i][j].ToString());
                    }
                }
    
                //转为字节数组  
                MemoryStream stream = new MemoryStream();
                workbook.Write(stream);
                var buf = stream.ToArray();
    
                //保存为Excel文件  
                using (FileStream fs = new FileStream(file, FileMode.Create, FileAccess.Write))
                {
                    fs.Write(buf, 0, buf.Length);
                    fs.Flush();
                }
            }
    
            /// <summary>
            /// 获取单元格类型
            /// </summary>
            /// <param name="cell"></param>
            /// <returns></returns>
            private static object GetValueType(ICell cell)
            {
                if (cell == null)
                    return null;
                switch (cell.CellType)
                {
                    case CellType.Blank: //BLANK:  
                        return null;
                    case CellType.Boolean: //BOOLEAN:  
                        return cell.BooleanCellValue;
                    case CellType.Numeric: //NUMERIC:  
                        return cell.NumericCellValue;
                    case CellType.String: //STRING:  
                        return cell.StringCellValue;
                    case CellType.Error: //ERROR:  
                        return cell.ErrorCellValue;
                    case CellType.Formula: //FORMULA:  
                    default:
                        return "=" + cell.CellFormula;
                }
            }
            #endregion
        }

     

    展开全文
  • java 导出Excel文件 网页方式打开 web.xml配置,直接连接window.open(“文件地址”);就可以打开或是下载excel文件,无需别的。。。。。
  • 如何将网页表格导出excel1、打开电脑,进入任意一个浏览器即可,首先找到浏览器【工具】栏菜单,打开浏览器【Internet选项】;2、点击【安全】选项卡,之后会出现安全设置界面;3、点击下方的自定义级别,在弹出的...
  • jQuery表格导出excel文件代码是一款日程事件表格点击按钮一键导出excel表格文件,pdf文件,CSV表格效果,支持网页打印代码。
  • JavaScript Html导出Excel文件(兼容所有浏览器),现网络上首个JavaScript Html代码块导出Excel文件,兼容全部浏览器导出Excel文件的Demo,可设置Excel文件名
  • 主要介绍了django使用xlwt导出excel文件实例代码,分享了相关代码示例,小编觉得还是挺不错的,具有一定借鉴价值,需要的朋友可以参考下
  • 简单实用网页表格数据导出Excel电子表格文件jQuery插件
  • 如何将网页表格导出excel用现成的组件:点击button开始导出:$("button").click(function(){$("#table2excel").table2excel({exclude: ".noExl",name: "Worksheet Name",filename: "SomeFile"});});下载:ort-...
  • 网页导出excel文件无访问权限的问题

    千次阅读 2012-07-06 14:59:51
    最近在做一个报表,导出excel的时候提示无访问权限,保存不了。 修改保存的文件地址的安全权限为everyone完全控制也不可以, 最后发现需要将网站添加到信任站点,就可以解决该问题。具体原因待查
  • 可以使用旧的Excel 2003 XML格式(在OpenXML之前)创建一个包含所需XML的字符串,然后在客户端可以使用数据URI通过XSL mime类型打开文件,或发送文件服务器端使用Excel模仿类型“ Content-Type:application / vnd.ms-...
  • jQuery表格导出excel文件代码是一款日程事件表格点击按钮一键导出excel表格文件,pdf文件,CSV表格效果,支持网页打印代码。
  • Java导出excel文件

    2018-12-13 23:30:20
    需求 将每个xmpp机房的在线/离线用户信息导出Excel表格(定时任务+网页按钮),并在网页上提供下载按钮进行下载。 效果预览 导出文件效果 点击下载弹...
  • 导出excel文件

    千次阅读 2010-06-21 15:37:00
    导出excel文件的时候遇到了 java.lang.OutOfMemoryError: Java heap space 再找了许多网页之后,解决方法是   今天又打开Eclipse那似曾相识的IDE,想了想才发现自己2007年3月份后...
  • 我们利用模拟浏览器爬取一个网页上的表格,但是它有很多页,这就需要我们不断点击下一页来获取新的表格继续爬取。 如图所示,我们无法确定一个动态更新数据的表格的具体页数,因为他会随着数据变化而增加或减少。 ...
  • JAVASCRIPT将网页表格导出EXCEL或WORD文件 阿里西西WEB开发 -------------------------------------------------------------------------------- 作者:阿里西西 文章来源: 更新时间:2005-12-15 一段把表格...
  • 因为最近需要实现前端导出 excel 文件,并且对导出文件的样式进行一些修改,比如颜色、字体、合并单元格等,所以我找到了 xlsx-style 这个项目,它可以对导出excel 文件进行一些样式上的修改,这个项目是 SheetJS...
  • ASP.NET导出Excel文件

    2018-06-16 16:13:22
    将页面显示的订单表导出Excel文件。 步骤 定义导出Excel文件的方法: private void Export(string FileType, string FileName) { Response.Charset = &quot;GB2312&quot;; Response.Content...
  • 这是一款非常强大实用的jQuery将网页表格数据导出excel表格文件、pdf文件和CSV文件代码,点击按钮一键导出,还支持网页打印、查询数据等。

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 12,008
精华内容 4,803
关键字:

从网页中导出excel文件