zoukankan      html  css  js  c++  java
  • word模版另存为网页(*.htm,*.html),转为jsp页面并加入数据后导出成word

    word模版另存为网页之后,将html格式的文件转为jsp页面,在页面上加入相应的动态值,加入的值中包含图片,这个该怎么处理??另外导出的文件需要拷贝到不同的地方(无法联网)使用。

    <%@ page contentType="application/vnd.ms-word; charset=GBK" language="java" import="java.util.*,java.io.*"%>
    <%@ taglib uri="tableURI" prefix="Combo" %>
    <%response.setContentType("application/msword");%>
    <%response.setHeader("Content-Type","application/msword");%>
    <%response.setHeader("Content-disposition","attachment;filename=djb.doc");%>
    <html xmlns:v="urn:schemas-microsoft-com:vml"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:w="urn:schemas-microsoft-com:office:word"
    xmlns="http://www.w3.org/TR/REC-html40">

    <head>
    <meta http-equiv=Content-Type content="text/html; charset=gb2312">
    <meta name=ProgId content=Word.Document>
    <meta name=Generator content="Microsoft Word 11">
    <meta name=Originator content="Microsoft Word 11">
    <link rel=File-List href="xmfiles/filelist.xml">
    <link rel=Edit-Time-Data href="xm.files/editdata.mso">

    <%
     String jc=request.getParameter("jc");
     String dbzt=request.getParameter("dbzt");
    try{
     int j=1;
     ArrayList aList = new ArrayList();
     ArrayList aListXjdwid = new ArrayList();
     aListXjdwid = getNominee.selectXjdw();
    %>
    <body lang=ZH-CN style='tab-interval:21.0pt;text-justify-trim:punctuation'>

    <div class=Section1 style='layout-grid:15.6pt'>

    <%
     for(int k=0;k<aListXjdwid.size();k++){
    %>
    <p class=MsoNormal style='margin-left:-.65pt;mso-para-margin-left:-.06gd'><span
    lang=EN-US style='mso-bidi-font-size:14.0pt'><o:p>代表团:<Combo:code displayStyle="" codeColName="xjdwid" descColName="xjdwname" codeTableName="xjdw" condition=" Display=1 order by Xh" code="<%=aListXjdwid.get(k).toString()%>"/></o:p></span></p>

    jsp中的代码如上,有没有人有好的建议??烦请指导!!

  • 相关阅读:
    获取Tekla属性方式
    基于C# 百度AI和科大汛飞语音合成SDK
    BIM工程信息管理系统-EF实体框架数据操作基类
    BIM工程信息管理新系统- 系统管理模块
    EChart绘制风速风向曲线分析图
    BIM工程信息管理系统-详细设计
    BIM工程信息管理系统搭建-系统功能需求
    基于C# 调用百度AI 人脸识别
    mago3DJS 应用
    Bitnami redmine windows环境下升级
  • 原文地址:https://www.cnblogs.com/fuhaots2009/p/3454005.html
Copyright © 2011-2022 走看看