excel列宽设置

This commit is contained in:
liyulin 2023-07-19 19:15:38 +08:00
parent 61bcc808c2
commit c7df613225
3 changed files with 5 additions and 2 deletions

View File

@ -1,7 +1,7 @@
{
"name": "@js-preview/excel",
"type" :"module",
"version": "1.2.3",
"version": "1.2.4",
"description": "",
"main": "lib/index.js",
"files": [

View File

@ -1,6 +1,6 @@
{
"name": "@vue-office/excel",
"version": "1.2.3",
"version": "1.2.4",
"description": "",
"main": "lib/index.js",
"files": [

View File

@ -19,6 +19,7 @@ const themeColor = [
];
let defaultColWidth = 80;
let defaultRowHeight = 24;
export function getData(src, options={}) {
return requestExcel(getUrl(src), options);
}
@ -248,6 +249,8 @@ export function transferExcelToSpreadSheet(workbook, options){
if(row.height){
sheetData.rows[spreadSheetRowIndex].height = row.height + (options.heightOffset || 0);
}else{
sheetData.rows[spreadSheetRowIndex].height = defaultRowHeight + (options.heightOffset || 0);
}
//includeEmpty = false 不包含空白单元格
(row._cells || []).forEach((cell, spreadSheetColIndex) =>{