Git Product home page Git Product logo

react-excel-renderer's People

Contributors

ashishd751 avatar coldshower avatar unger1984 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  avatar

react-excel-renderer's Issues

Outdated underlying modules updation

One of our application is using react-excel-render. But the Veracode static code analysis shows the [email protected] and [email protected] are susceptible to ReDOS vulnerability. Also, [email protected], [email protected], [email protected] is required.

Please help us by updating the underlying packages or suggest us an alternate way to mitigate this. At least, let me know when you are planning to update these libraries, if you are planning on such action. Help much much appreciated. Thank you.

How to fix problem about date time?

I insert excel file but date on excel such as 14/03/2019 not show .
It show 42917. if I want to get value date.
How to solve this problem ?

Images rendering

Images are not displaying in excel sheet , any solution for images rendering.

Reading cells format

Hello,

In the demo I see just possibility to read cells content and showing this content on webpage. Is it possible to show cells formatting as well (the same as source excel file) ?

Error to install and run

Try to run the example but -
Could not find a declaration file for module 'react-excel-renderer'. 'c:/Users/nb50502/Source/GulfCoastQualityControl/FrontEnd/node_modules/react-excel-renderer/build/index.js' implicitly has an 'any' type.
Try npm install @types/react-excel-renderer if it exists or add a new declaration (.d.ts) file containing declare module 'react-excel-renderer';

4th column name missing

I am trying to use this:

        <OutTable data={rows ? rows : []} columns={cols ? cols : []} tableClassName="ExcelTable2007" tableHeaderRowClass="heading" />

to read a file that has 4 column. It shows me my col names/letters till D including the index but for my last column, it doesn't show the column title or a letter at the top. Can this be fixed?

Multisheet render

Hi All,
Could someone help me how to render excel file with multiple sheets? Cant find any information regarding this.
Thanks

Allow empty cells.

I am trying to read data from an excel file, but if a col has empty rows, the data from the next column gets moved to the previous column, thus shifting all cols by 1,how do I fix this?

Eg :
0: 5263
​​​
1: "Test"
​​​
2: "Test 100"
​​​
3: "09-04-00"
​​​
4: "Female"
​​​
5: "09-03-2022"
​​​
6: "India"
​​​
7: "Mumbai"
​​​
8: "Mumbai 8 (Kim Verma)"
​​​
9: "AB+ve"
​​​
11: "KEM, Mumbai"

Logging it, you can see index 10 has been skipped here.

How to use this without input

HI there -

I tried to rewrite some of the code so that I could reference a file path and use that / instead of using a HTML input file -

After a fairly large amount of searching my losing my mind a little and was wondering if I could ask for a little help.

Can you reference a local file path (relative to your react src folder i.e. src/assets/data.xlsx) and require that into the react app - then have the code covert that to a JSON object which your react app can populate a component with?

Thank you for any help in advance,
Wally

How can I set column width?

Hello!

Could you please tell me on what is column width dependent or, maybe, how can I set it?

Kind regards,
Nadzeya Yakimchyk

Can I use backend api call

I am implementing something like, after clicking on button, I am fetching excel file from backend, and it is giving me backend url for excel file. Now I want to render this file. In your example, it is taking input file, I tried to do from my side, but I am not able to. How to access api call result (excel file) and then render like you did in example.

code onclick button is something like:

openFileBrowser = () => {
  
     axios({
       url:'http://127.0.0.1:5000/display',
       method:'GET',
       responseType: 'blob'
     })
     .then((response) => {
         const url = window.URL
         .createObjectURL(new Blob([response.data]));
                 const link = document.createElement('a');
                 link.href = url;
                 console.log(link);
                 link.setAttribute('type', 'file');
             
                 document.body.appendChild(link);
                 link.click();
   })
   }

Upgrade dependency on xlsx to 0.17.1

Can you upgrade xlsx to 0.17.0^ to address the following CVEs? Thanks

CVE-2021-32014
moderate severity
Vulnerable versions: < 0.17.0
Patched version: 0.17.0
SheetJS Pro through 0.16.9 allows attackers to cause a denial of service (CPU consumption) via a crafted .xlsx document that is mishandled when read by xlsx.js.

CVE-2021-32012
moderate severity
Vulnerable versions: < 0.17.0
Patched version: 0.17.0
SheetJS Pro through 0.16.9 allows attackers to cause a denial of service (memory consumption) via a crafted .xlsx document that is mishandled when read by xlsx.js (issue 1 of 2).

CVE-2021-32013
moderate severity
Vulnerable versions: < 0.17.0
Patched version: 0.17.0
SheetJS Pro through 0.16.9 allows attackers to cause a denial of service (memory consumption) via a crafted .xlsx document that is mishandled when read by xlsx.js (issue 2 of 2).

react should be a peerDependency

Currently, react is listed as a dependency. This causes a second version of react to be installed as a dependency of this one, appearing under `node_modules.

$ npm ls react
[email protected] /path/to/project
└─┬ [email protected]
  └── [email protected]

$ ls node_modules/react-excel-renderer/node_modules/
react

As this library is already assuming the consuming app uses react, it should be a peer dependency, using the version of react already installed, which would look something like:

$ npm ls react
[email protected] /path/to/project
└── [email protected]

$ ls node_modules/react-excel-renderer/node_modules
ls: node_modules/react-excel-renderer/node_modules: No such file or directory

Infinite loop when xlsx file has 2 lines with 1 empty value

Hello, first of thanks for your lib, it's awesome.
I've installed the npm package version 1.1.0.

I've been able to visualize excel files in my simple app so it's great.

However, I have one particular xlsx file that, when uploaded, crashes the browser tab in which the web app is running. I've checked, it's the ExcelRenderer that is stuck in an infinite loop, and it's before the callback so not in my code.
This excel file has bogus data, has only 2 lines, and the particularity is that it has one missing value on the second line.
I don't know why this exact configuration triggers the crash, but here is the excel file:

pg_model_err.xlsx

Ignore empty rows from sheet file

Reference issue: #6

I'm trying to load a file with a few rows of data, but the callback gives me an extra 200k rows of nothing, taking a long time to process the file instead of just returning the first N rows with data.

Is there a way to ignore these empty rows or is it a problem with the file itself?

File for reference:
EXCEL-READER-TEST-FILE.xlsx

Edit: It seems the empty rows with formatted cells (white borders) are counting as data. Any ideas?

Is it possible to directly embed excel ?

When I'm trying to pass excel file's url into ExcelRenderer I'm getting the follow error: Unhandled Rejection (TypeError): Failed to execute 'readAsBinaryString' on 'FileReader': parameter 1 is not of type 'Blob'

Is it possible to embed it directly somehow?

want to get other tabs data as well, but getting first tab data only by default

fetch(url.xlsx).then((response) => { console.log('qsqwdqf', response) response.blob().then((myBlob) => { console.log('wffswrw', myBlob) ExcelRenderer(myBlob, (err, resp) => { if (err) { console.log(err); } else { setExcel({ cols: resp.cols, rows: resp.rows, }); } }); }); });

it's working for first tab, want to display other tabs data as well from same file on perticular condition, pls help

Make renderer run even if the same file was selected

Hello:

I have installed this per you sample OnChange handler code. This works great but, what if the user were to select the same file again? When selecting file "a.xlsx" the code runs great, but when selecting file "a.xlsx" again, the code does not run, probably because of the OnChange handler. What would I do to allow your code to run each and every time even if the same file was selected over an over again?

Thank you for your time.

React-scripts webpack conflict

I have some issues using this package with React.

The react-scripts package provided by Create React App requires a dependency:
  "webpack": "4.29.6"
Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:
  .........\webpack (version: 4.30.0)

I guess this can be solved by moving the webpack dependency to devDependencies in package.json.

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.