好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

如何在web中实现类似excel的表格控件

Execl功能非常强大,内置的很多函数或公式可以大大提高对数据的加工处理能力。那么在web中有没有类似的控件呢?经过一番搜寻,发现handsontable具备了基本的excel功能支持公式,同时能对数据进行实时编辑。另外支持拖动复制、Ctrl+C 、Ctrl+V 等等。在浏览器支持方面,它支持以下的浏览器: IE7+, FF, Chrome, Safari, Opera。

首先引入相关库文件,公式支持不包含在handsontable.full.js中,需要单独引入:

  1     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/jquery/jquery-1.10.2.js"  >  script  > 
  2     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/handsontable/handsontable.full.js"  >  script  > 
  3     link   rel  ="stylesheet"   media  ="screen"   href  ="http://handsontable.github.io/handsontable-ruleJS/lib/handsontable/handsontable.full.css"  > 
  4     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/lodash/lodash.js"  >  script  > 
  5     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/underscore.string/underscore.string.js"  >  script  > 
  6     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/moment/moment.js"  >  script  > 
  7     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/numeral/numeral.js"  >  script  > 
  8     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/numericjs/numeric.js"  >  script  > 
  9     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/js-md5/md5.js"  >  script  > 
 10     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/jstat/jstat.js"  >  script  > 
 11     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/lib/formulajs/formula.js"  >  script  > 
 12     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/js/parser.js"  >  script  > 
 13     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/RuleJS/js/ruleJS.js"  >  script  > 
 14     script   src  ="http://handsontable.github.io/handsontable-ruleJS/lib/handsontable/handsontable.formula.js"  >  script  >  

查看更多关于如何在web中实现类似excel的表格控件的详细内容...

  阅读:42次