Git Product home page Git Product logo

excelize's Issues

[Q] xlsx.load(buffer) 时卡住,cpu 100%

💬 Questions and Help

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) 这一行执行不到

Respecting Original Contributions: An Appeal to Retain Git History

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

[F] Add file encryption function

🚀 Feature Proposal

Add file encryption function

Motivation

Add file encryption function

Example

await writeWorkbook.xlsx.writeFile(test, {password: '123456'});

[BUG] Internal hyperlink does not work on wps office

🐛 Bug Report

Lib version: 4.4.1

image

Steps To Reproduce

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' };

The expected behaviour:

Possible solution (optional, but very helpful):

三级表头 Cannot merge already merged cells [BUG] XYZ

🐛 Bug Report

Lib version: X.Y.Z

Steps To Reproduce

const wb = new ExcelJS.Workbook();
const ws = wb.addWorksheet('XYZ');

ws.getCell('A1').value = 7;
expect(ws.getCell('A1').value).to.equal(7);

The expected behaviour:

Possible solution (optional, but very helpful):

[F] Add pivot table func

🚀 Feature Proposal

A clear and concise description of what the feature is.

Add pivot table func

Motivation

Please outline the motivation for the proposal.

Example

Please provide an example for how this feature would be used.

[BUG] This xlsx file that cannot be opened seems to be stuck

🐛 Bug Report

Can not open this file.

Lib version: 4.4.2

Source problem address

Steps To Reproduce

(async () => {
  const workbook = new ExcelJS.Workbook();
  const fund = await workbook.xlsx.readFile('/path/to/hang.xlsx');
  const sheet = fund.worksheets[0];
  console.log(sheet);
})()

The expected behaviour:

Possible solution (optional, but very helpful):

[F] Add removeNote method

🚀 Feature Proposal

Add removeNote method

#link:exceljs/exceljs#1746

Motivation

Please outline the motivation for the proposal.

Example

Please provide an example for how this feature would be used.

[Q] column each cell issue

💬 Questions and Help

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'}这样的

aaabbb.xlsx

Cannot Open Encrypted Files

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",
});
  • OS: Windows 11 22000.2538
  • Package Version: 4.4.6
  • Excel Version: Microsoft® Excel® 适用于 Microsoft 365MSO (版本 2309 Build 16.0.16827.20166) 64 [位]

P.S. Here is a link to the file I tried to open:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.