43081j / 43081j/rar.js

Background color not displayed

Abierto
#7 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
513
Forks
52
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I am unable to see background in xlsm file.

**I have imported these libraries**
xlsx = require('xlsx'),
fileSaver = require('file-saver');

**I am using the following code**

**for setting the background**
cell = {t:'n' , v: workSheet['A' + (row+1)].v + workSheet['B' + (row+1)].v , f:'A' + (row+1)+'+'+'B'+(row+1) ,s: {bgColor: { indexed: 64 }}};

**and this for writing into file**
wbout = xlsx.write(wb, {bookType:'xlsx', bookSST:true, type: 'base64',cellStyles:'true'});

// to blob
function sheet_to_blob (s) {
const buf = new ArrayBuffer(s.length)
const view = new Uint8Array(buf)
for ( var i = 0; i != s.length; ++i ) view[i] = s.charCodeAt(i) & 0xFF
return buf
}
// export xlsx with file-saver
fileSaver.saveAs(new Blob([sheet_to_blob(wbout)], {
type: 'application/octet-stream'
}), 'test.xlsx')

**and it says ReferenceError: Blob is not defined**

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.