protobi / js-xlsx

XLSX / XLSM / XLSB (Excel 2007+ Spreadsheet) / ODS parser and writer
http://oss.sheetjs.com/js-xlsx
Other
814 stars 416 forks source link

Styling not working on all cells of merged cell #166

Open Sowmiya-Pachiappan opened 2 years ago

Sowmiya-Pachiappan commented 2 years ago

Hi all, I am working in react project. I am using js-xlsx for excel export. I have an issue on merged cell. I want to style merged cell like border. But When I am adding border, It is not applied to all merged cell. For example, If I have merged Cell A1:G1, When I am adding border, it only affects A1 cell, const merge = [ { s: { r: 0, c: 0 }, e: { r: 0, c: 6 } }, { s: { r: 1, c: 0 }, e: { r: 3, c: 0 } }, { s: { r: 1, c: 1 }, e: { r: 3, c: 1 } }, { s: { r: 1, c: 2 }, e: { r: 3, c: 2 } }, { s: { r: 1, c: 3 }, e: { r: 1, c: 6 } }, ]; rateChart['!merges'] = merge; rateChart['!merges'].s = { border: { top: { style: 'thin', color: '000000', }, left: { style: 'thin', color: '000000', }, right: { style: 'thin', color: '000000', }, bottom: { style: 'thin', color: '000000', }, }, }; What I have to do for styling merged cell completely? Please Help me.