本帖最后由 jdsoft 于 2022-11-22 19:42 编辑
表格导出后自动扩展了列并有边框样式,如图
参数
var excelIo = new GC.Spread.Excel.IO();
var serializationOption = {
includeBindingSource: true, // include binding source when converting the workbook to json, default value is false
ignoreStyle: false, // ignore styles when converting workbook to json, default value is false
ignoreFormula: false, // ignore formulas when converting workbook to json, default value is false
saveAsView: true, //include the format string formatting result when converting workbook to json, default value is false
rowHeadersAsFrozenColumns: false, // treat row headers as frozen columns when converting workbook to json, default value is false
columnHeadersAsFrozenRows: false, // treat column headers as frozen rows when converting workbook to json, default value is false
includeAutoMergedCells: true // include the automatically merged cells to the real merged cells when converting the workbook to json.
}
excelIo.save(workbook.toJSON(serializationOption), function (blob) {
saveAs(blob, "111.xlsx");
}, function (e) {
console.error("excelIo-error:" + e);
});
|