`
文章列表

springmvc注解

@Controller @RequestMapping("/test") public class TestController {         /*    @RequestMapping("/start")     public String start(HttpServletRequest request){         String name = request.getParameter("name");         System.out.println(name);         return ...

springjdbc

public class DefaultTemplate {     private JdbcTemplate jt;     public void insert(Person person) {         String sql = "INSERT INTO person(name,password) VALUES (?,?)";         // 全部的值应该变为对象数组         Object params[] = new Object[] { person.getName(), person.getPassword() };         ...
 new Date( System.currentTimeMillis()                - TimeZone.getDefault().getRawOffset() );
    @Transactional( rollbackFor = {Exception.class}, readOnly = false )
-Xmx512m
            // 创建临时目录名(如果用当前时间作为临时目录名,可能会存在重复)            String tempFileName = UUID.randomUUID().toString();

创建workbook

  Workbook wb = null;        try        {            ins = new FileInputStream( excelFileName );            wb = WorkbookFactory.create( ins );
   private void resetCalFormual( String sheetName, String filePath,            Map<Integer, Integer[]> cellFormula ) throws Exception    {        Excel excel = new Excel();        IWorkBook workbook = excel.OpenWorkBook( filePath );        WorkSheet sheet = workbook.GetSheet(sheetName);        ...

exce的操作

设置打印标题行:     private void setPrintTitle( IWorkBook workbook, List<String> sheetNames,            int startRow, int endRow ) throws Exception    {        int index = 0;                for ( String sheetName : sheetNames )            {            index = workbook.getSheetIndex( sheetName );      ...

pdf table使用

public class PdfTableTest {     public static void main(String[] args) throws Exception {         Document doc = new Document(PageSize.A4);         PdfWriter                 .getInstance(doc, new FileOutputStream("c:/test/pdf/pdftable.pdf"));         doc.open(); /*//        float[] wi ...

pdf create

create pdf code

js List

<script type="text/javascript"> function my() { var list=<%= getValue()%>; alert(list[0].address); } </script></head><body><%!public String getValue() throws Exception {  List<Person> list = new ArrayList<Person>();  Person p1 = new Person();   ...
EXCEL基本脚本操作 利用脚本操作Excel文件,一些基础的东西,主要涉及到生成Excel文件,和写入单元格内容,设置字体、宽高等,以及如何合并单元格,更高级的可以通过录制宏来查看。 <SCRIPT LANGUAGE='JavaScript'>  xlCenter=-4108;  xlbottom=-4107;  xlRight=-4152;  oSheet;  oActiveSheet;  oApplication;//初始化Excel对象try { oApplication    = new ActiveXObject ( 'Excel.Application' ) ...
使用javascript中的ActiveXObject填充并设置Excel格式 1创建 var XLObj = new ActiveXObject("Excel.Application" );var xlBook = XLObj.Workbooks.Add; //新增工作簿var ExcelSheet = xlBook.Worksheets(1); //创建工作表 2.保存表格 ExcelSheet.SaveAs("C:\\TEST.XLS" ...
最后,如何读取到Excel模板中数据到页面上共客户编辑数据再保存到数据库中(此步可以用xml发送至后台交互,在此不进一步说明)JS,如下:Fxjc_ExcelDatasIntoSqlDatas.js Code [http://www.xueit.com] <!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->//////////////////////////////////// ...
Global site tag (gtag.js) - Google Analytics