Comments (3)
https://www.visactor.io/vtable/guide/export/excel
目前已经提供了导出格式化接口,调用table.getCellOriginValue(col,row)可获取原始数据;如果需要匹配excel数据,需要返回值符合exceljs value规则 https://github.com/exceljs/exceljs/tree/master?tab=readme-ov-file#value-types
from vtable.
@
https://www.visactor.io/vtable/guide/export/excel 目前已经提供了导出格式化接口,调用table.getCellOriginValue(col,row)可获取原始数据;如果需要匹配excel数据,需要返回值符合exceljs value规则 https://github.com/exceljs/exceljs/tree/master?tab=readme-ov-file#value-types
现在返回的只是值,格式化需要用到exceljs的numFmt ,感觉现在设计的导出格式化问题有点不对吧,应该是改显示格式,不是改单元格的值
from vtable.
https://www.visactor.io/vtable/guide/export/excel 目前已经提供了导出格式化接口,调用table.getCellOriginValue(col,row)可获取原始数据;如果需要匹配excel数据,需要返回值符合exceljs value规则 https://github.com/exceljs/exceljs/tree/master?tab=readme-ov-file#value-types
格式化应该是像这样,单元格的值还是原始值,显示格式传excel支持的格式,不然导出来全是文本
ws.getCell('B1').value = 0.016;
ws.getCell('B1').numFmt = '0.00%';
from vtable.
Related Issues (20)
- [Feature] 导出指定的行和列
- [Bug] 表格出现滚动条后 圈选单元格鼠标超过表格视窗外就会报错
- [Bug] 排序order处于normal状态的情况下进行筛选报错或者无数据 HOT 3
- [Bug] InputEditor 启用时,选中input框中的内容后,再点击表格外的空白处,inputEditor编辑器不会自动移除,点击表格内部可以移除,官网示例一样存在这个问题。 HOT 3
- [Feature] 单元格仅支持单选, 禁止拖拽选中多个单元格 HOT 1
- [Bug] tooltip问题和滚动问题 HOT 2
- [Bug] checkboxStyle: disableFill设置无效 HOT 1
- [Bug] pivotChart click chart rerender problem
- [Feature] 增加百分比计算 HOT 1
- [Feature] group mode support rowSeriesNumber
- [Bug] 使用groupBy时,通过addRecord在指定行插入数据时,数据行总插入在分组最后一行
- [Bug] 拖拽调整列宽后会触发onClickCell事件
- [Bug] 圆角区域边框怎么隐藏
- [Bug] 使用图元 tooltip弹出层样式没有继承过来 样式还是默认白色背景 HOT 2
- [Bug] 自定义单元格和 其它列开启显示冻结图标后 点击,自定义单元格的内容会消失
- [Bug] 性能有很大的问题 HOT 3
- 分组指定行插入数据、删除行不生效、菜单不会自动消失问题
- [Feature] 合并单元格,tooltip显示策略优化
- [Bug] cellBorderClipDirection and cellInnerBorder render effect error
- 透视表的单元格编辑,默认编辑器如何设置校验
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vtable.