You can continue to use version 9 code with Spread.Sheets version 11.
Add the gc.spread.sheets.migration.11.0.0.js reference to your page for backward compatibility. The gc.spread.sheets.all.11.0.0.js file is also required.
Several methods are not supported for backward compatibility: buildFont, Compose, and Clear (Style class).
This example references the migration file.
JavaScript |
Copy Code
|
---|---|
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Spread.Sheets</title> <link href="./css/gc.spread.sheets.excel2013white.11.0.0.css" rel="stylesheet"/> <script src="./scripts/gc.spread.sheets.all.11.0.0.js" type="application/javascript"></script> <script src="./scripts/interop/gc.spread.sheets.migration.11.0.0.js" type="application/javascript"></script> <script type="text/javascript"> window.onload = function(){ //This is the V10 code var spread = new GcSpread.Sheets.Spread(document.getElementById("ss"), { sheetCount: 3 }); var sheet = spread.getActiveSheet(); sheet.getColumn(0).formatter('#,##0.0##'); sheet.setValue(0, 0, 123456); sheet.setValue(1, 0, 12345); } </script> </head> <body> <div id="ss" style="width:100%;height:500px;border: 1px solid gray;"></div> </body> </html> |