EXECL ist sehr leistungsfähig und viele integrierte Funktionen oder Formeln können die Verarbeitungsfähigkeit von Daten erheblich verbessern. Gibt es also ähnliche Steuerelemente im Web? Nach einiger Suche stellte ich fest, dass MoreTable grundlegende Excel -Funktionsunterstützungsformeln hat und Daten in Echtzeit bearbeiten kann. Darüber hinaus unterstützt es Drag Copy, Strg+C, Strg+V usw. In Bezug auf die Browserunterstützung unterstützt es die folgenden Browser: IE7+, FF, Chrome, Safari, Opera.
Zunächst werden die entsprechenden Bibliotheksdateien eingeführt. Die Formelunterstützung ist nicht in der motivierbaren. Full.js enthalten und muss separat eingeführt werden:
<script src = "http://handsontable.github.io/handsontable-rulejs/lib/jquery/jquery-1.10.2.js"> </script> <script src = "http://handsontable.github.io/handsontable.lible.> rel = "styleSheet" media = "screen" href = "http://handsontable.github.io/handsontable-rulejs/lib/handsontable/handsontable.full.csss"> <Skript 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/lule Js. src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/js/parser.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/liB/Rulejs/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/js/rulys/rulejs/rulys/pllejs/pllejs/pllejs/pllejs/pllejs/pllejs/pllejs/pllejs. src = "http://handsontable.github.io/handsontable-rulejs/lib/rulejs/js/rulejs.js"> </script> <script src = "http://handsontable.github.io/handsontable-rulejs/lib/handSontable/handSontable.formula.-formula.-formula.-formula.-formula.-formula.-formula.js.js/lib/handSontable/handSontable/handSontable.-formula.-forla.-formula.-formula.-formula.-formula.-formula.js.js/lib/hands.
Legen Sie einen DIV -Behälter in HTML ein, um die mobilbare Kontrolle zu speichern:
<body> <div id = "Handwarde-Code"> </div> </body>
Holen Sie sich im JavaScript -Code zunächst den Div -Container und erstellen Sie dann die Tabellensteuerung:
<script type = "text/javaScript"> $ (document) .ready (function () {var data11 = [['= $ b $ 2', "maserati", "mazda", "return 1+2;", 'return DataAccess.getScalar ("Select Top 1 Name von Cloud_users Wherty, Wherty, cellphone = 15895211111111111486"); 2941, 4303, 354, 5814], [2010, 5, 2905, 2867, '= Summe (A4, 2, 3)', '= $ B1'], [2011, 4, 2517, 4822, 552, 6127], [2012, '= Sum, A2: A5), (B5, E3) (B5, E3) (B5, E3), (B5, E3) (B5, E3) (B5, E3) (B5, E3) (B5, E3), (B5, E3), (B5, E3), (B5, E3), (B5, E3), () ,öckstöde ich das 4151]; //cellProperties.readonly = true; // Datenformat zurückgeben: "HTML", // "XML", "HTML", "Skript", "JSON", "JSONP", "Text". $ ("#msg"). // Hideloading (); TD.AppendChild (NewValue); NegativeValuerenderer); METTABLE. </script>Die Formel von = Summe (B5, E3) wird durch Regeljs bereitgestellt. Rückgabe 1+2 ist ein von Ihnen implementiertes C# -Codebuchskript. Sie müssen klicken, um zu analysieren:
public class csengine: ihttphandler {private static int count = 0; public void processRequest (httpcontext context) {context.response.contentType = "text/plain"; Versuchen Sie {count ++; String ret = ""; String code = context.request ["Code"]. toString (); if (string.isnullorEmpty (Code)) {ret = "Parameterfehler"; } else {scriptOptions options = scriptOptions.default .addreferences (Assembly.GetaSembly (Typof (dbservices.dataaccess)) //.addimports("System.data ") //.addimports("system.data.sqlclient") .addimports ("Dbservices"). var state = csharpscript.runasync (Code, Optionen) .Result.ReturnValue; ret = state.toString (); Zustand = null; Optionen = null; } Console.writeLine (count); context.Response.write (ret); } catch (Ausnahme ex) {// Fehlerkonsole.WriteLine (count); }} public bool isReusable {get {return false; }}}Führen Sie den Code wie folgt aus:
Das obige ist der gesamte Inhalt dieses Artikels. Ich hoffe, es wird für das Lernen aller hilfreich sein und ich hoffe, jeder wird Wulin.com mehr unterstützen.