有没有大佬用过exceljs + x-spreadsheet 这个怎么固定表头呢 ?

有没有大佬用过exceljs + x-spreadsheet 这个怎么固定表头

const options = {

"viewLocalImage":JM_VIEW_IMG_URL,//预览本地图片方法

domain:baseFull,

rpBar: true,

showToolbar:false , //头部操作按钮

showGrid: false, //excel表格

showContextmenu: false, //右键操作按钮

readOnly:true,

view: {

height: () => {

let queryArea = document.querySelector('.jm-query-collapse')

let restHeight = 40

if(queryArea){

restHeight+=queryArea.scrollHeight+2;

}

return document.documentElement.clientHeight - restHeight;

},

width: () => document.documentElement.clientWidth,

},

row: {

len: 100,

height: 25,

},

col: {

len: 50,

width: 100,

minWidth: 60,

height: 0,

indexWidth: 0,

},

style: {

bgcolor: '#ffffff',

align: 'left',

valign: 'middle',

textwrap: false,

strike: false,

underline: false,

color: '#0a0a0a',

font: {

name: 'Helvetica',

size: 10,

bold: false,

italic: false,

},

},

};

options.exportDisabled = exportDisabled;

//x.spreadsheet.locale('zh-cn');

const requestParam = getRequestUrlParam();

let jmdata=requestParam.jmdata;

// 下载oss图片到本地

options.downLoadImage = (imageUrl)=>{

return $jm.downLoadImage(options.domain, imageUrl)

}

if(jmdata){

options.total = 1;

xs = x.spreadsheet('#jm-sheet-wrapper', options)

const excelData = JSON.parse(decodeURIComponent(jmdata));

xs.data.rows._={}

xs.data.cols._={};

xs.data.styles=[];

xs.loadData(excelData);

}else{

handleReportQueryInfo(token).then(()=>{

let page=1;

let total = 1;

options.pageInfo={

url:`${baseFull}/jmreport/show`,

data:{

"id":excelConfigId,

"params":requestParam

}

}

找过百度

以上是 有没有大佬用过exceljs + x-spreadsheet 这个怎么固定表头呢 ? 的全部内容, 来源链接: utcz.com/p/935196.html

回到顶部