zurmokeeper / excelize Goto Github PK
View Code? Open in Web Editor NEWExcel Workbook Manager
Home Page: https://www.npmjs.com/package/@zurmokeeper/exceljs
License: MIT License
Excel Workbook Manager
Home Page: https://www.npmjs.com/package/@zurmokeeper/exceljs
License: MIT License
import { Workbook } from '@zurmokeeper/exceljs';
function readFile(fileRes: any) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsArrayBuffer(fileRes);
reader.onload = () => {
resolve(reader.result);
};
});
}
export const loadExcel = async (file: any) => {
const buffer = await readFile(file);
console.log('[ buffer ]-15', buffer);
const workbook = new Workbook();
console.log('[ workbook ]-18', workbook);
const book = await workbook.xlsx.load(buffer as Buffer);
console.log('[ book ]-18', book);
};
没有报错,标签页卡死,标签页 CPU 100%
console.log('[ book ]-18', book) 这一行执行不到
Dear Excelize,
I've noticed that your project incorporates code from the https://github.com/exceljs/exceljs library. However, the entire Git history has been removed, which subsequently erased information about the original authors of the project. I would like to emphasize the importance of recognizing and appreciating the efforts and contributions of those who have dedicated their time and energy to develop this library over the years.
Maintaining the project's history not only pays homage to its creators but also serves as a key to understanding the evolution of the code and the rationale behind various changes. It is invaluable information for other developers who might want to use or further develop your project.
With all due respect, I understand that each project might have its reasons for certain decisions. Nonetheless, I urge you to consider restoring this history or, at the very least, acknowledging the original authors in your documentation or on your project's main page. Collaboration and recognition within the open-source community play a pivotal role and help foster a healthy ecosystem for all its users.
Thank you for your attention, and I wish you success in your ongoing development endeavors.
Best regards,
Pawel Siemienik
New xlsx option for ignoring certain nodes for improved performance
#Source:exceljs/exceljs#2132
Please outline the motivation for the proposal.
Please provide an example for how this feature would be used.
Release large values early for GC to be able to do its job
source: #exceljs/exceljs#1929
Please outline the motivation for the proposal.
Please provide an example for how this feature would be used.
Add file encryption function
Add file encryption function
await writeWorkbook.xlsx.writeFile(test, {password: '123456'});
Lib version: 4.4.1
const wb = new ExcelJS.Workbook();
const ws1 = wb.addWorksheet('Sheet1');
const ws2 = wb.addWorksheet('Sheet2');
// internal link
ws1.getCell('A1').value = { text: 'Sheet2', hyperlink: '#\'Sheet2\'!A1' };
Lib version: 4.4.2
Related Questions: #exceljs/exceljs#2256 #exceljs/exceljs#1736
Lib version: X.Y.Z
const wb = new ExcelJS.Workbook();
const ws = wb.addWorksheet('XYZ');
ws.getCell('A1').value = 7;
expect(ws.getCell('A1').value).to.equal(7);
Please do not use issues for making a questions, for this purposes much better is GitHub Discussions feature:
https://github.com/exceljs/exceljs/discussions/categories/q-a
New discussion
button.Q&A
category.A clear and concise description of what the feature is.
Add pivot table func
Please outline the motivation for the proposal.
Please provide an example for how this feature would be used.
Can not open this file.
Lib version: 4.4.2
(async () => {
const workbook = new ExcelJS.Workbook();
const fund = await workbook.xlsx.readFile('/path/to/hang.xlsx');
const sheet = fund.worksheets[0];
console.log(sheet);
})()
Add expression support for x14:cfRule
#Source:exceljs/exceljs#1767
Please outline the motivation for the proposal.
Please provide an example for how this feature would be used.
Add removeNote method
#link:exceljs/exceljs#1746
Please outline the motivation for the proposal.
Please provide an example for how this feature would be used.
is that anywhere to let me get range of cell? How do I set a color for a specific cell range, such as A2-C9999?
#link:exceljs/exceljs#2306
let workbook = new Excel.Workbook();
let sheet = workbook.addWorksheet("example");
const list = ["example 1", "example 2", "example 2"];
sheet.addRow(list, "i");
const column = sheet.getColumn(1);
column.eachCell({ includeEmpty: true }, (cell, rowNumber) => {
cell.fill = {
type: "pattern",
pattern: "solid",
fgColor: {
argb: "FF85c8ff",
},
};
});
let buffer: Excel.Buffer = await workbook.xlsx.writeBuffer();
let base64 = Buffer.from(buffer).toString("base64");
return base64;
console.log(cell.style.fill.bgColor)
//输出{indexed: 64},没有获取到具体的颜色值argb,譬如应该输出{indexed: 64,argb:'#ff00ff00'}这样的
I am trying to read an encrypted XLSX file with the following code, but got an error saying "TypeError: Unknown cipher". I am sure that file can be opened by Excel with password "123456". I'm not sure what is wrong. Would anyone please help me investigate?
const workbook = new ExcelJS.Workbook();
const res = await workbook.xlsx.readFile("123 copy.xlsx", {
password: "123456",
});
P.S. Here is a link to the file I tried to open:
Basic shape support added
#Source:exceljs/exceljs#2077
Please outline the motivation for the proposal.
Please provide an example for how this feature would be used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.