回复 3楼skiphyuk的帖子
我提供是cell binding是一个一个的绑定。
如果你不需要这样的方式,那么你之前使用的是binding还是setValue?
如果是binding的话,还有一种table的binding。table本身就是一片区域。
直接绑定到某个区域,以下代码仅供参考:
- var dataSource = [
- { "SupplierID": "1", "CompanyName": "Exotic Liquids", "Address": "49 Gilbert St.", "City": "London", "Country": "UK", "Phone": "(171) 555-2222" },
- { "SupplierID": "2", "CompanyName": "New Orleans Cajun Delights", "Address": "P.O. Box 78934", "City": "New Orleans", "Country": "USA", "Phone": "(100) 555-4822" },
- { "SupplierID": "3", "CompanyName": "Grandma Kelly's Homestead", "Address": "707 Oxford Rd.", "City": "Ann Arbor", "Country": "USA", "Phone": "(313) 555-5735" },
- { "SupplierID": "4", "CompanyName": "Tokyo Traders", "Address": "9-8 Sekimai Musashino-shi", "City": "Tokyo", "Country": "Japan", "Phone": "(03) 3555-5011" },
- { "SupplierID": "5", "CompanyName": "Cooperativa de Quesos 'Las Cabras'", "Address": "Calle del Rosal 4", "City": "Oviedo", "Country": "Spain", "Phone": "(98) 598 76 54" }
- ];
- $(document).ready(function () {
- $("#ss").wijspread();
- var spread = $("#ss").wijspread("spread");
- var sheet = spread.getActiveSheet();
- sheet.addTableByDataSource("table", 3, 3, dataSource);
- });
复制代码 |