Code Monkey home page Code Monkey logo

excelize-wasm's People

Contributors

cnmlgbgithub avatar covv avatar fsfsx avatar lidp20 avatar peng avatar spearmootz avatar taomin597715379 avatar tianaiyouqing avatar tvso avatar xuri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

excelize-wasm's Issues

Argument type Buffer is not assignable to parameter type Uint8Array[]

const { readFile } = require('fs/promises')

excelize.OpenReader(await readFile('./file.xlsx'))

Why is the first parameter of OpenReader() Uint8Array[] instead of Uint8Array ?

Argument type Buffer is not assignable to parameter type Uint8Array[]

/**
* OpenReader read data stream from buffer and return a populated spreadsheet
* file.
* @param r The contents buffer of the file
* @param opts The options for open and reading spreadsheet
*/
export function OpenReader(r: Uint8Array[], opts?: Options): NewFile;

how to read excel in browser?

Description

Steps to reproduce the issue:
how to read excel in browser?

Describe the results you received:

Describe the results you expected:

Output of node -v:

Output of npm -v:

Output of go version:

(paste your output here)

Excelize version or commit ID:

(paste here)

Environment details (OS, Microsoft Excel™ version, Browser version, physical, etc.):

Does not run on Node 20+

Description

excelize-wasm 0.0.4 does not run on Node 20 or later due to following code trying to patch global.crypto if window is undefined:

if (typeof window === 'undefined') {
global.crypto = {
async getRandomValues(b) {
const { randomFillSync } = await import('crypto');
randomFillSync(b);
}
};
global.performance = {
now() {
const [sec, nsec] = process.hrtime();
return sec * 1000 + nsec / 1000000;
}
};
}
:

require('excelize-wasm'); throws to the following error:

TypeError: Cannot set property crypto of #<Object> which has only a getter
    at Module.<anonymous> (…/node_modules/excelize-wasm/main.cjs:1:46588)

because global.crypto is now a getter without a setter.

Node already has crypto.getRandomValues and performance.now available by default, so this patching is not even needed, i.e. should be skipped if these properties already exist.

Output of node -v: v20.11.1

Excelize version or commit ID: v0.0.4

[Feature request] Provide options for data validation drop list

Description

I am trying to replicate the official dependent drop list example with excelize-wasm but I can't provide items for the drop list.

In the type definition of DataValidation it can be seen that there's no place for list options -- none of the types are arrays.

According to the documentation, the correct way of providing options in Go is .SetSqrefDropList method but I cannot find its counterpart in JavaScript.

Is it not implemented yet or have I missed something?

Steps to reproduce the issue:

  1. N/A

Describe the results you received: There is no way to provide drop list options.

Describe the results you expected: There is a way to provide drop list options.

Output of node -v: v20.1.0

Output of npm -v: 9.6.4

Output of go version: go version go1.20.4 darwin/amd64

Excelize version or commit ID: [email protected]

Environment details (OS, Microsoft Excel™ version, Browser version, physical, etc.):

OS: macOS 13.3.1 (22E261)
Excel version: 16.73 (23050701)

Document / implement a formalized release process

Description

This is a tooling feature request. I think it would be a nice addition to use tooling to aid in the package publishing and release process.

In the past, I have used release-it which makes bumping version number, publishing on npm, creating github release, and git tagging the release a really pleasant and simple process.

All of the other feature request template is N/A in this case

memory running out

hello,

i am running node with 4GB of memory.

when i create an excel containing around 64k records with 58 columns of uuids i run out of memory.

i tried to play with the importObject and added mem, and memory into various keys but it didnt work :( otherwise i would be making a PR

exports: {
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
  },
  env: {
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
  },
  js: {
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
  },
  go: {
    memory: new WebAssembly.Memory({
      initial: 100,
      maximum: 62500,
      shared: true,
    }),
    mem: new WebAssembly.Memory({ initial: 100, maximum: 62500, shared: true }),

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.