SpreadJS 15
Getting Started / Use Previous Code with Current Version
In This Topic
    Use Previous Code with Current Version
    In This Topic

    You can continue to use version 9 code with later versions of SpreadJS.

    Add the gc.spread.sheets.migration.x.x.x.js reference to your page for backward compatibility. The gc.spread.sheets.all.x.x.x.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.x.x.x.css" rel="stylesheet"/>
        <script src="./scripts/gc.spread.sheets.all.x.x.x.js" type="application/javascript"></script>
        <script src="./scripts/interop/gc.spread.sheets.migration.x.x.x.js" type="application/javascript"></script>
        <script type="text/javascript">
            window.onload = function(){
                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