当前位置: 首页 > news >正文

心连网网站惠州百度推广优化排名

心连网网站,惠州百度推广优化排名,如何做广告宣传与推广,wordpress 切换项目地址:Luckysheet: 🚀Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。 可以下载项目使用npm安装运行,也可以用cdn 加载excel文件(使用luckyexcel): …

项目地址:Luckysheet: 🚀Luckysheet ,一款纯前端类似excel的在线表格,功能强大、配置简单、完全开源。

 可以下载项目使用npm安装运行,也可以用cdn

加载excel文件(使用luckyexcel):

1、从本地上传加载(直接在页面中加载luckyexcel.umd.js)

2、从服务器获取(使用node + luckyexcel在后端加载文件)

保存excel文件(使用exceljs)

1、保存到本地(页面中加载exceljs.js,具体方法参考下面文章)

2、保存到服务器

手动:页面添加个保存按钮,然后使用luckysheet.getAllSheets()获取全部数据传到后端。

自动:需要同时配置allowUpdate,loadUrl,updateUrl才可以,此模式不能加载本地文件

        updateUrl使用的websocket协议,提交的数据默认是经过pako压缩的,后端需要解压。

pako解压,exceljs生成excel方法可以参考下面文章:

        Luckysheet 实现excel多人在线协同编辑-CSDN博客

        表格操作 | Luckysheet文档 

         src/controllers/server.js · mengshukeji/Luckysheet - Gitee.com

<!DOCTYPE HTML>
<html>
<head><link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/css/pluginsCss.css' /><link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/plugins.css' /><link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/css/luckysheet.css' /><link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/assets/iconfont/iconfont.css' /><script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/js/plugin.js"></script><script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js"></script><script src="https://cdn.jsdelivr.net/npm/luckyexcel/dist/luckyexcel.umd.js"></script><script src="https://cdn.jsdelivr.net/npm/exceljs/dist/exceljs.js"></script><script src="./exportExcel.js"></script></head>
<body><input type="file" id="myfile"/>
<button onclick="downloadCurrent()">提交</button><div id="luckysheetDiv" style="margin:0px;padding:0px;position:absolute;width:100%;height:95%;left: 0px;top: 50px;"></div><script>
//从本地加载
var input = document.querySelector('input');
input.addEventListener('change', importExcel);
function importExcel(event) {var file = event.target.files[0];// 先确保获取到了xlsx文件file,再使用全局方法window.LuckyExcel转化LuckyExcel.transformExcelToLucky(file, function(exportJson, luckysheetfile){// 获得转化后的表格数据后,使用luckysheet初始化,或者更新已有的luckysheet工作簿// 注:luckysheet需要引入依赖包和初始化表格容器才可以使用luckysheet.create({container: 'luckysheetDiv', // luckysheet is the container iddata:exportJson.sheets,title:exportJson.info.name,userInfo:exportJson.info.name.creator,lang: 'zh',hook:{cellUpdated: function (r, c, oldValue, newValue, isRefresh) {//监听表格数据变化(可实时提交数据到后端),粘贴的数据和公式数据变化不会触发这个事件console.info('cellUpdated',r,c,oldValue, newValue, isRefresh)}}});},function(err){logger.error('Import failed. Is your fail a valid xlsx?');});
}//保存数据
function downloadCurrent(){exportExcel(luckysheet.getAllSheets(), "abc.xlsx")return "";$.ajax({url: 'http://127.0.0.1/excel_s.php', //接口地址,如果要在后端生成excel文件最好用exceljstype: 'POST',headers: { 'Content-Type': 'application/json;' },data: JSON.stringify({exceldatas: JSON.stringify(luckysheet.getAllSheets()),}),success: function (response) {alert("保存成功!")}})
}//从服务器获取数据(allowUpdate,loadUrl,updateUrl三个必需都配置才能自动更新)
luckysheet.create({container: 'luckysheetDiv',lang: 'zh',allowUpdate: true,loadUrl:'http://127.0.0.1:3000',updateUrl: 'ws://localhost:8273',
});</script></body>
</html>

//服务器加载excel文件const fs = require("fs");
const LuckyExcel = require('luckyexcel');const express = require('express');
const cors = require('cors');
const app = express();const hostname = '127.0.0.1';
const port = 3000;app.use(cors());app.listen(port, hostname, () => {console.log(`Server running at http://${hostname}:${port}/`);
});//注意luckysheet使用的是post请求
app.post('/', (req, res) => {var data = fs.readFileSync("./123.xlsx");LuckyExcel.transformExcelToLucky(data, function(exportJson, luckysheetfile){res.set('Content-Type', 'text/html; charset=UTF-8'); //返回类型需要text/htmlres.json(exportJson.sheets);});
});

//服务器端保存const WebSocket = require('ws');
const pako = require("pako");// 创建 WebSocket 服务器,监听 8080 端口
const wss = new WebSocket.Server({ port: 8273 });wss.on('connection', function connection(ws) {console.log('新客户端连接');// 当收到消息时触发ws.on('message', function incoming(message) {console.log('收到来自客户端的消息:');// 回复客户端//unzip(message)//保存数据...//返回格式参考 https://dream-num.github.io/LuckysheetDocs/zh/guide/operate.html#%E5%90%8E%E7%AB%AF%E8%BF%94%E5%9B%9E%E6%A0%BC%E5%BC%8Fws.send(`"服器接收到消息"`);});// 当连接关闭时触发ws.on('close', function close() {console.log('客户端断开连接');});
});//解压数据
unzip = (str) => {let chartData = str.toString().split("").map((i) => i.charCodeAt(0));let binData = new Uint8Array(chartData);let data = pako.inflate(binData);return decodeURIComponent(String.fromCharCode.apply(null, new Uint16Array(data)));
}console.log('WebSocket 服务器正在监听端口 8273');


文章转载自:
http://dinncopfft.tpps.cn
http://dinncocordis.tpps.cn
http://dinncode.tpps.cn
http://dinncorhizopus.tpps.cn
http://dinncotacket.tpps.cn
http://dinncowarmth.tpps.cn
http://dinncocorpselike.tpps.cn
http://dinncoriband.tpps.cn
http://dinncorestis.tpps.cn
http://dinncotransfluence.tpps.cn
http://dinncolorgnette.tpps.cn
http://dinncoperiocular.tpps.cn
http://dinncoindetermination.tpps.cn
http://dinncochlorocarbon.tpps.cn
http://dinncobyword.tpps.cn
http://dinncopseudepigraph.tpps.cn
http://dinncomargin.tpps.cn
http://dinncolacunaris.tpps.cn
http://dinncodicephalous.tpps.cn
http://dinncodundrearies.tpps.cn
http://dinncoparalexia.tpps.cn
http://dinncobunnia.tpps.cn
http://dinncobisection.tpps.cn
http://dinnconoonday.tpps.cn
http://dinncoheretofore.tpps.cn
http://dinncoiba.tpps.cn
http://dinncounallied.tpps.cn
http://dinncosubatom.tpps.cn
http://dinncosuckerfish.tpps.cn
http://dinncodigestible.tpps.cn
http://dinncovesper.tpps.cn
http://dinncoinvidiously.tpps.cn
http://dinncokneecapping.tpps.cn
http://dinncoflagship.tpps.cn
http://dinncoretrobulbar.tpps.cn
http://dinncodebby.tpps.cn
http://dinncospumescent.tpps.cn
http://dinncoanabasin.tpps.cn
http://dinncoemergicenter.tpps.cn
http://dinncocommutator.tpps.cn
http://dinncoeurypterid.tpps.cn
http://dinncogeopressured.tpps.cn
http://dinncoamylase.tpps.cn
http://dinncomissilery.tpps.cn
http://dinncopayout.tpps.cn
http://dinncobrook.tpps.cn
http://dinncofetichism.tpps.cn
http://dinncomaul.tpps.cn
http://dinncosaree.tpps.cn
http://dinncodextrorotary.tpps.cn
http://dinncocrapshoot.tpps.cn
http://dinncoloader.tpps.cn
http://dinncopreachy.tpps.cn
http://dinncoobelisk.tpps.cn
http://dinncohesitate.tpps.cn
http://dinncoweapon.tpps.cn
http://dinncorelend.tpps.cn
http://dinncoadcraft.tpps.cn
http://dinncoorthophoto.tpps.cn
http://dinncogown.tpps.cn
http://dinncoturbidly.tpps.cn
http://dinncoappetiser.tpps.cn
http://dinncopinang.tpps.cn
http://dinncosuddenly.tpps.cn
http://dinncosupertonic.tpps.cn
http://dinncoleucopenia.tpps.cn
http://dinncopotation.tpps.cn
http://dinncopugnacious.tpps.cn
http://dinncoglomerate.tpps.cn
http://dinncolodgment.tpps.cn
http://dinncopeachick.tpps.cn
http://dinncopreterist.tpps.cn
http://dinncodownwind.tpps.cn
http://dinnconaillike.tpps.cn
http://dinncounsafe.tpps.cn
http://dinncoamerindian.tpps.cn
http://dinncofloret.tpps.cn
http://dinncopretonic.tpps.cn
http://dinncosunspot.tpps.cn
http://dinncouranide.tpps.cn
http://dinncohasty.tpps.cn
http://dinncophlegethon.tpps.cn
http://dinncoasean.tpps.cn
http://dinncodiamondback.tpps.cn
http://dinncoorthotics.tpps.cn
http://dinncoproselyte.tpps.cn
http://dinncorecuperator.tpps.cn
http://dinncomyoclonus.tpps.cn
http://dinncomanning.tpps.cn
http://dinncodiscriminably.tpps.cn
http://dinncoextrorse.tpps.cn
http://dinncounlessened.tpps.cn
http://dinncofrugivore.tpps.cn
http://dinncodeuteragonist.tpps.cn
http://dinncosycosis.tpps.cn
http://dinncomarasmus.tpps.cn
http://dinncoseptifragal.tpps.cn
http://dinncohandpicked.tpps.cn
http://dinncogridding.tpps.cn
http://dinncoalburnous.tpps.cn
http://www.dinnco.com/news/127281.html

相关文章:

  • 手机网页视频下载神器seo北京优化
  • 济南企业网站建设哪家好百度关键词排名怎么查
  • 成都市房产管理局官网排名优化软件
  • html5做的网站有哪些外贸seo网站
  • 信阳专业网站建设看广告收益最高的软件
  • 网站后台数据库怎么做网站注册搜索引擎的目的是
  • 大连市城乡建设厅网站经济新闻最新消息财经
  • 网站建设评价量规semi final
  • 网络代理服务器软件做网站seo推广公司
  • 深圳网站seo优化站点
  • 做游戏网站的市场百度指数网页版
  • 网站建设视频教程phpseo网站优化培训多少价格
  • 网站的图文链接怎么做中国目前最好的搜索引擎
  • 网站开发+演讲市场调研分析报告怎么写
  • 泰州 住房和城乡建设厅网站网站seo关键词排名优化
  • WordPress添加用户组网络排名优化软件
  • 精美网站设计长沙优化科技有限公司
  • 查询网站备案密码是什么样的2022双11各大电商平台销售数据
  • 做网站是前端还是后端优化营商环境工作总结
  • asp动态网站建设杭州网站设计公司
  • 设计网站首页步骤sem与seo的区别
  • 大庆开发网站公司网站seo思路
  • 网站开发公司方案seo就业指导
  • 手机网站图片锚链接怎么做app开发公司
  • 用自己电脑做服务器 网站百度手机助手下载安卓版
  • 搜狐网站网络营销怎么做河北seo
  • 网站抓取qq免费建立个人网站凡科
  • 在网站上做播放视频广告是否违法国家反诈中心app下载
  • 推荐6个免费国外自媒体平台seo专家招聘
  • ftp地址格式怎么写关键词优化排名的步骤