react-excel-preview
v0.1.1
Published
<span><img src="https://img.shields.io/npm/dt/react-excel-preview.svg" alt="Total Downloads"></span> <span><img src="https://img.shields.io/npm/v/react-excel-preview.svg" alt="Latest Release"></span> <span><img src="https://img.shields.io/npm/l/react-exce
Downloads
14
Readme
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