📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

react-excel-preview

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-excel-preview

<img src="https://img.shields.io/npm/l/react-exce

0.1.1
latest
npm
Version published
Weekly downloads
34
100%
Maintainers
1
Weekly downloads
 
Created
Source

Total Downloads Latest Release License

ReactExcelPreview

Install

npm i react-excel-preview

react-excel-preview

支持excel预览的react组件库。

安装

npm install react-excel-preview

使用示例

  • 网络地址,比如 https://***.excel

excel文件预览

通过网络地址预览示例如下

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import ReactExcelPreview from 'react-excel-preview';
import 'react-excel-preview/dist/index.css'
const App = () => {
  return (
    <div style={{
      width: '100vw',
      height: '100vh',
    }}>
      <ReactExcelPreview 
        options={{
          maxColLength: 3
        }}
        rowHeight={48}
        showGrid={false}
        showContextmenu={false}
        value={"http://static.shanhuxueyuan.com/demo/excel.xlsx"}></ReactExcelPreview>
    </div>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

参考

@vue-office/excel

https://www.npmjs.com/package/@vue-office/excel?activeTab=readme

Keywords

react

FAQs

Package last updated on 11 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts