博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
导出Echarts 图表到Office
阅读量:5797 次
发布时间:2019-06-18

本文共 3944 字,大约阅读时间需要 13 分钟。

在toolboox中新建一个插件,插件的参数为

{ show: true, title: '导出到excel', icon: 'path://M784.814967 293.780976c-37.510312 0-74.940806 0-112.450095 0 0 18.71627 0 37.509289 0 56.224536 37.508265 0 74.93876 0 112.450095 0C784.814967 331.291289 784.814967 312.497247 784.814967 293.780976zM865.215112 687.757956c-0.077771-139.354861-0.243547-278.717909 0.157589-418.151565-0.555655-13.656021 0.409322-28.755927-7.868201-40.647769-11.803837-8.109702-26.748201-7.144724-40.322357-7.710612-80.401168 0.401136-160.801313 0.243547-241.200434 0.243547 0-21.444405 0-42.812061 0-64.258513l-47.715745 0c-123.212206 21.767769-246.505253 42.890856-369.801371 64.337307 0 187.390901 0 374.781802 0 562.172703 122.568547 21.444405 245.224074 42.011836 367.637078 64.257489l49.880037 0c0-24.096814 0-48.192605 0-72.290443 83.292008-0.157589 166.5789 0.243547 249.796206 0 13.412474-0.564865 33.492812-0.963954 36.709063-17.673521C867.379405 734.986607 864.817046 711.13334 865.215112 687.757956zM395.011031 628.325355c-13.657045-33.494858-30.277584-65.866127-40.082904-100.889805-10.916631 32.615838-26.503631 63.379493-39.029922 95.343485-17.59575-0.243547-35.18843-0.964978-52.773947-1.686409 20.646226-40.403199 40.560788-81.121576 61.847603-121.282251-18.071587-41.370223-37.916565-81.929987-56.547901-123.056664 17.673521-1.043772 35.337833-2.086521 53.010331-3.050476 11.971659 31.406291 25.062815 62.405305 34.94386 94.621031 10.598382-34.135448 26.425859-66.265216 39.996946-99.281167 18.151405-1.285273 36.387745-2.408863 54.616922-3.295046-21.445428 43.935652-42.968627 87.87642-64.814168 131.645273 22.089088 44.98454 44.656059 89.639576 66.822918 134.62514C433.642886 630.889761 414.369937 629.688399 395.011031 628.325355zM841.040527 751.615333c-88.354304 0-176.710654 0-265.059841 0 0-16.063861 0-32.128745 0-48.193629 21.443381 0 42.811038 0 64.256466 0 0-18.715247 0-37.509289 0-56.224536-21.445428 0-42.813085 0-64.256466 0 0-10.683317 0-21.444405 0-32.127721 21.443381 0 42.811038 0 64.256466 0 0-18.715247 0-37.510312 0-56.224536-21.445428 0-42.813085 0-64.256466 0 0-10.682293 0-21.446451 0-32.128745 21.443381 0 42.811038 0 64.256466 0 0-18.715247 0-37.509289 0-56.224536-21.445428 0-42.813085 0-64.256466 0 0-10.683317 0-21.445428 0-32.127721 21.443381 0 42.811038 0 64.256466 0 0-18.71627 0-37.509289 0-56.224536-21.445428 0-42.813085 0-64.256466 0 0-10.683317 0-21.446451 0-32.129768 21.443381 0 42.811038 0 64.256466 0 0-18.715247 0-37.508265 0-56.224536-21.445428 0-42.813085 0-64.256466 0 0-16.063861 0-32.127721 0-48.192605 88.350211 0 176.706561 0 265.059841 0C841.040527 414.264025 841.040527 582.939679 841.040527 751.615333zM784.814967 382.136304c-37.510312 0-74.940806 0-112.450095 0 0 18.715247 0 37.508265 0 56.224536 37.508265 0 74.93876 0 112.450095 0C784.814967 419.645592 784.814967 400.851551 784.814967 382.136304zM784.814967 470.489584c-37.510312 0-74.940806 0-112.450095 0 0 18.715247 0 37.509289 0 56.224536 37.508265 0 74.93876 0 112.450095 0C784.814967 507.998873 784.814967 489.204831 784.814967 470.489584zM784.814967 558.843888c-37.510312 0-74.940806 0-112.450095 0 0 18.714224 0 37.509289 0 56.224536 37.508265 0 74.93876 0 112.450095 0C784.814967 596.353177 784.814967 577.558112 784.814967 558.843888zM784.814967 647.197168c-37.510312 0-74.940806 0-112.450095 0 0 18.715247 0 37.509289 0 56.224536 37.508265 0 74.93876 0 112.450095 0C784.814967 684.706457 784.814967 665.912415 784.814967 647.197168z', onclick: function (params, api) {   if (Office) {     let base64 = api       .getConnectedDataURL({         excludeComponents: ['toolbox'],         backgroundColor: '#fff'       })       .replace('data:image/png;base64,', '') // 删除多余字符串     let width = api.getWidth() / 2     let height = api.getHeight() / 2     Office.context.document.setSelectedDataAsync(base64, {       coercionType: Office.CoercionType.Image,       imageLeft: 0,       imageTop: 0,       imageWidth: width,       imageHeight: height     })   } }}复制代码

转载地址:http://insfx.baihongyu.com/

你可能感兴趣的文章
SAS和SATA硬盘的区别
查看>>
现代程序设计 学生情况调查
查看>>
U盘安装linux后无法引导
查看>>
C# 矩阵作业
查看>>
俺的新书《Sencha Touch实战》终于出版了
查看>>
关于数据库查询时报“query block has incorrect number of result columns”
查看>>
li下的ul----多级列表
查看>>
UVa 11292 勇者斗恶龙(The Dragon of Loowater)
查看>>
区域生长算法
查看>>
switch语句小练习
查看>>
组合逻辑电路
查看>>
POP-一个点击带有放大还原的动画效果
查看>>
UE4材质是什么样的机制
查看>>
使用QTP录制自带Flight小实例
查看>>
Loadrunner脚本编程(4)-数据类型操作和字符串操作
查看>>
STL 算法
查看>>
分享:Backbone.js 样例站点与入门指南
查看>>
图的基本算法
查看>>
HTML基础(一)
查看>>
boost.circular_buffer简介
查看>>