Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Current »

我们提供了 Spread.Sheets 从 V9 到 V11 迁移的兼容文件:gc.spread.sheets.migration.11.0.0.js

在页面中引用该文件,您可以无须改变您的代码,轻松迁移到 V11版本。

当然, 您仍然需要引用 gc.spread.sheets.all.11.0.0.js 文件。


但是请注意,以下方法和类不支持向后兼容:

buildFont

Compose

Clear (Style class)


示例代码
以下代码演示了如何使用 gc.spread.sheets.migration.10.1.0.js 迁移 V9 版本的代码:

HTML
<!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 V9 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>



更多信息:

API Changes

  • No labels