您好,
使用autoFitRow来实现自适应汉高,
下方代码您可以参考下:- $(document).ready(function() {
- var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"), { sheetCount : 1 });
- var sheet = spread.getActiveSheet();
- var style = sheet.getDefaultStyle();
- style.wordWrap = true;
- sheet.setDefaultStyle(style);
- spread.bind(GC.Spread.Sheets.Events.ValueChanged, function (s, e) {
- var newValue = e.newValue;
- var oldValue = e.oldValue;
- if(newValue !== oldValue){
- var sheet = spread.getActiveSheet();
- sheet.autoFitRow(e.row);
- }
- });
- });
复制代码
|