EXECL은 매우 강력하며 많은 내장 기능 또는 공식이 데이터의 처리 능력을 크게 향상시킬 수 있습니다. 그렇다면 웹에 비슷한 컨트롤이 있습니까? 검색 후 핸드 턴 가능에는 기본 Excel 기능 지원 공식이 있으며 실시간으로 데이터를 편집 할 수 있음을 발견했습니다. 또한 드래그 사본, Ctrl+C, Ctrl+V 등을 지원합니다. 브라우저 지원 측면에서 IE7+, FF, Chrome, Safari, Opera의 다음 브라우저를 지원합니다.
먼저 관련 라이브러리 파일이 소개됩니다. 공식 지원은 Handsontable.full.js에 포함되지 않으며 별도로 소개해야합니다.
<script src = "http://handsontable.github.io/handsontable-rulejs/lib/jquery/jquery-1.10.2.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.full.js"> </script> <link rel = "stylesheet"media = "screen" href = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.full.css"> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/lodash/lodash.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/underscore.string/underscore.string.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/moment/moment.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/moment/moment.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/numeral/numeral.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/numericjs/numeric.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/js-md5/md5.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/js-md5/md5.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/jstat/jstat.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/lib/parser.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/js/js/js/js/js, src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/js/parser.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/ src = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.js"> </script>
핸드 폰트 가능한 컨트롤을 저장하려면 DIV 컨테이너를 HTML에 넣으십시오.
<body> <div id = "handsontable-code"> </div> </body>
JavaScript 코드에서 먼저 div 컨테이너를 가져온 다음 테이블 컨트롤을 만듭니다.
<script type = "text/javaScript"> $ (document) .ready (function () {var data1 = [[ '= $ b $ 2', "maserati", "mazda", "return 1+2;", 'return dataAccess.getScalar ( "cloud_users에서 탑 1 선택 = 15895211486"; ");" 2941, 4303, 354, 5814], [2010, 5, 2905, 2867, '= sum (a4, 2, 3)', '= $ b1'], [2011, 4, 2517, 4822, 552, 6127], [2012, 'sum (a2 : a5)', '= e3,', e3) '' 4151; //cellProperties.Readonly = true; background = '#eee'; $ .ajax ({// post type : // 제출 된 URL : //csengine.ashx). // 데이터 형식 데이터 유형 : "html", "xml", "html", "script", "json", "text". $ ( "#msg"). html (decodeuri (data)); // hideloading (); // Option () {// alert ( 'error'}}); TD. AppendChild (NewValue)}; 부정적인 컨테이너 1. handsontable ({data : data1, minsparerows : 1, colheaders : true, rowheaders : true, true, manualcolumnresize : true, 셀 : 기능 (Row, col, prop) {{}; handstable.stringify (this.getData () [row] [endexof ( 'return') {셀프로 르더 = "refortvaluerender}); </스크립트>= sum (b5, e3)의 공식은 rulejs에 의해 제공됩니다. 반환 1+2는 직접 구현 한 C# 코드 스크립트입니다. 구문 분석하려면 클릭해야합니다.
공개 클래스 CSENGINE : IHTTPHANDLER {개인 정적 int count = 0; public void processRequest (httpcontext context) {context.response.contentType = "text/plain"; {count ++; 문자열 ret = ""; 문자열 코드 = context.request [ "Code"]. toString (); if (string.isnullorEmpty (code)) {ret = "매개 변수 오류"; } else {scriptOptions 옵션 = scriptOptions.default .addReferences (astembly.getAsembly (typeof (dbservices.dataAccess))))) //.addimports("system.data ") //.addimports (“system.data.sqlclient") var state = csharpscript.runasync (코드, 옵션) .result.returnValue; ret = state.toString (); 상태 = null; 옵션 = null; } console.writeline (count); context.response.write (ret); } catch (예외 예) {// Error Console.WriteLine (count); }} public bool isreusable {get {return false; }}}다음과 같이 코드를 실행하십시오.
위는이 기사의 모든 내용입니다. 모든 사람의 학습에 도움이되기를 바랍니다. 모든 사람이 wulin.com을 더 지원하기를 바랍니다.