SpreadJS 13
SpreadJS Documentation / Developer's Guide / Get Started / Use Previous Code with the Current Version
In This Topic
    Use Previous Code with the Current Version
    In This Topic

    You can continue to use version 9 code with SpreadJS version 12.

    Add the gc.spread.sheets.migration.13.0.0.js reference to your page for backward compatibility. The gc.spread.sheets.all.13.0.0.js file is also required.

    Several methods are not supported for backward compatibility: buildFont, Compose, and Clear (Style class).

    Using Code

    This example references the migration file.

    Copy Code
    <!DOCTYPE html>
    <html lang="en">
        <meta charset="UTF-8">
        <link href="./css/gc.spread.sheets.excel2013white.13.0.0.css" rel="stylesheet"/>
        <script src="./scripts/gc.spread.sheets.all.13.0.0.js" type="application/javascript"></script>
        <script src="./scripts/interop/gc.spread.sheets.migration.13.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.setValue(0, 0, 123456);
                sheet.setValue(1, 0, 12345);
        <div id="ss" style="width:100%;height:500px;border: 1px solid gray;"></div>
    See Also