{"id":799,"date":"2025-04-16T10:17:04","date_gmt":"2025-04-16T02:17:04","guid":{"rendered":"http:\/\/www.xinsk.cn\/?p=799"},"modified":"2025-04-16T10:49:43","modified_gmt":"2025-04-16T02:49:43","slug":"vue3tsxlsx%e5%ae%9e%e7%8e%b0excel%e6%96%87%e4%bb%b6%e4%b8%8a%e4%bc%a0%e5%b9%b6%e9%a2%84%e8%a7%88","status":"publish","type":"post","link":"http:\/\/www.xinsk.cn\/?p=799","title":{"rendered":"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u529f\u80fd\uff1a<\/mark><\/strong><br>\uff081\uff09\u6587\u4ef6\u4e0a\u4f20\u65f6\u53ef\u4ee5\u9884\u89c8\u5185\u5bb9\u3002<br>\uff082\uff09\u5bf9\u6587\u4ef6\u540d\u8fdb\u884c\u5224\u65ad\uff0c\u4e0d\u6ee1\u8db3\u6761\u4ef6\u65f6\u63d0\u793a\u9519\u8bef\u3002<br>\uff083\uff09\u5bf9\u6587\u4ef6\u8868\u5934\u8fdb\u884c\u68c0\u6d4b\uff0c\u5982\u6709\u9519\u8bef\uff0c\u5c06\u9519\u8bef\u5185\u5bb9\u663e\u793a\u5728\u9884\u89c8\u533a\u57df\u4e2d\uff08\u540c\u65f6\u53ef\u5bf9\u9519\u8bef\u7684\u5355\u5143\u683c\u8fdb\u884c\u6807\u7ea2\u663e\u793a\uff09\u3002<br>\uff084\uff09\u9519\u8bef\u5185\u5bb9\u6ca1\u6709\u4fee\u590d\u524d\uff0c\u70b9\u51fb\u4e0a\u4f20\u4f1a\u63d0\u793a\u201c\u8acb\u5148\u8655\u7406\u6587\u4ef6\u932f\u8aa4\u540e\uff0c\u518d\u9032\u884c\u4e0a\u50b3\uff01\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\"><strong>\u76ee\u524d\u95ee\u9898\uff1a<\/strong><\/mark><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-black-color\">\u65e0\u6cd5\u6709\u6548\u5904\u7406\u5355\u5143\u683c\u5408\u5e76\u65f6\u7684\u663e\u793a\u95ee\u9898<\/mark><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">1\u3001FlieUpload.vue<\/mark><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;template>\n  &lt;div class=\"iwpp-file-manage\">\n    &lt;div class='iwpp-file-container'>\n      &lt;h3>\u6587\u4ef6\u4e0a\u50b3&lt;\/h3>\n      &lt;el-upload ref=\"uploadRef\" class=\"iwpp-file-upload\" accept=\".xlsx, .xls\" max='1' :show-file-list=\"false\"\n        :before-upload=\"beforeUpload\" :http-request=\"handleUpload\">\n        &lt;el-button type=\"primary\">\u9ede\u64ca\u9078\u64c7 Excel \u6587\u4ef6&lt;\/el-button>\n        &lt;p>\u6ce8\u610f\uff1a\u53ea\u652f\u6301 Excel \u6587\u4ef6\u683c\u5f0f\uff0c\u4e14\u7b2c\u4e00\u884c\u5fc5\u9808\u7232\u8868\u982d&lt;\/p>\n      &lt;\/el-upload>\n\n      &lt;!-- \u6570\u636e\u9884\u89c8\u8868\u683c -->\n      &lt;div class=\"iwpp-file-table-box\">\n        &lt;h3>{{ fileName }}&lt;\/h3>\n        &lt;p>{{ tabelErrorMsg }}&lt;\/p>\n        &lt;div class=\"iwpp-file-table-preview\">\n          &lt;table id=\"iwpp-file-table\" style=\"border-collapse: collapse; \">&lt;\/table>\n        &lt;\/div>\n        &lt;div class=\"iwpp-file-table-btn\">\n          &lt;button id=\"clearButton\">\u53d6\u6d88&lt;\/button>\n          &lt;button id=\"confirmButton\">\u78ba\u5b9a\u4e0a\u50b3&lt;\/button>\n        &lt;\/div>\n      &lt;\/div>\n    &lt;\/div>\n  &lt;\/div>\n&lt;\/template>\n\n\n&lt;script lang=\"ts\" setup>\nimport { ref } from 'vue'\nimport { ElMessage, UploadInstance, ElLoading} from 'element-plus'\nimport * as XLSX from 'xlsx'\nimport { axios_post } from '@\/utils\/axiosinstance';\n\nconst fileName = ref('')\nconst uploadRef = ref&lt;UploadInstance | null>(null);\nconst currentFile = ref(null);\nconst isClickDisabled = ref(false);\nconst tabelErrorMsg = ref('');\n\n\/\/ \u4e0a\u4f20\u524d\u7684\u7c7b\u578b\u9a8c\u8bc1\nconst beforeUpload = (file) => {\n  const isExcel = \/\\.(xlsx|xls)$\/.test(file.name)\n  clearUpload();\n  if (!isExcel) {\n    ElMessage.error('\u4ec5\u652f\u6301\u4e0a\u4f20 Excel \u6587\u4ef6!')\n    return false\n  }\n  return true\n}\n\n\/\/ \u5904\u7406\u6587\u4ef6\u4e0a\u4f20\nconst handleUpload = async ({ file }) => {\n  currentFile.value = file\n  const reader = new FileReader()\n  fileName.value = file.name\n\n  \/\/ \u9a8c\u8bc1\u6587\u4ef6\u540d\u683c\u5f0f\n  if(fileName.value.length > 0){\n    \/\/ \u4f60\u7684\u6587\u4ef6\u540d\u5224\u65ad\u903b\u8f91\n  }\n\n  reader.onload = (e) => {\n    const data = new Uint8Array(e.target.result)\n    const workbook = XLSX.read(data, { type: 'array' })\n\n    \/\/ \u53d6\u7b2c\u4e00\u4e2a\u5de5\u4f5c\u8868\n    const firstSheetName = workbook.SheetNames&#91;0]\n    const worksheet = workbook.Sheets&#91;firstSheetName]\n    if(!worksheet&#91;'!ref']){\n      return ElMessage.error('\u6587\u4ef6\u5185\u5bb9\u4e3a\u7a7a\uff01');\n    }\n\n    \/\/ \u751f\u6210\u8868\u683c HTML\n    const tableHtml = generateTableHtml(worksheet);\n    const iwppFileTable = document.getElementById('iwpp-file-table') as HTMLTableElement;\n    iwppFileTable.innerHTML = tableHtml;\n    const iwppFileTableHeader = iwppFileTable.querySelector('tr') as HTMLTableRowElement;\n\n    \/\/ \u9a8c\u8bc1\u8868\u5934\u683c\u5f0f\n    const iwppFileTableHeaderCells = iwppFileTableHeader.querySelectorAll('td') as NodeListOf&lt;HTMLTableCellElement>;\n    let tableHeaderErr = '';\n    if (iwppFileTableHeaderCells.length == 0) {\n      tableHeaderErr = '\u8868\u683c\u4e2d\u6c92\u6709\u8868\u982d\uff1b';\n      tabelErrorMsg.value += '';\n      return ElMessage.error(tableHeaderErr)\n    }\n    for (let i = 0; i &lt; iwppFileTableHeaderCells.length; i++) {\n      const cell = iwppFileTableHeaderCells&#91;i];\n      if(!cell.innerText){\n        tableHeaderErr += '\u7b2c' + (i+1) + '\u5217\u6c92\u6709\u6a19\u984c\uff1b';\n        cell.style.border = '3px solid #cc0000';\n        cell.style.color = '#cc0000';\n        continue;\n      }\n      \/\/ \u4f60\u7684\u5176\u4ed6\u8868\u5934\u5224\u65ad\u903b\u8f91\n    }\n    if(tableHeaderErr.length > 0){\n      tabelErrorMsg.value += '\u8868\u683c\u6a19\u984c\u683c\u5f0f\u932f\u8aa4\uff1a' + tableHeaderErr;\n    }else{\n      tabelErrorMsg.value = '';\n    }\n    iwppFileTableHeader.style.fontWeight = 'bold';\n    iwppFileTableHeader.style.height = '30px';\n\n    \/\/ \u663e\u793a\u8868\u540d\u548c\u4e0a\u50b3\n    var tableTitle = document.querySelector('.iwpp-file-table-box > h3') as HTMLElement;\n    var tableErrorP = document.querySelector('.iwpp-file-table-box > p') as HTMLElement;\n    var previewDiv = document.querySelector('.iwpp-file-table-preview') as HTMLElement;\n    var tableDiv = document.querySelector('.iwpp-file-table-btn') as HTMLElement;\n    if (tableTitle) {\n      tableTitle.style.display = 'block';\n      tableErrorP.style.display = 'block';\n      previewDiv.style.display = 'block';\n      tableDiv.style.display = 'block';\n\n      \/\/ \u7ed1\u5b9a\u53d6\u6d88\u548c\u4e0a\u50b3\u7684\u6309\u94ae\u4e8b\u4ef6\n      var clearButton = document.getElementById('clearButton') as HTMLElement;\n      var confirmButton = document.getElementById('confirmButton') as HTMLElement;\n      clearButton.removeEventListener('click', clearButtonClickListener)\n      clearButton.addEventListener('click', clearButtonClickListener)\n\n      confirmButton.removeEventListener('click', confirmButtonClickListener);\n      confirmButton.addEventListener('click', confirmButtonClickListener);\n\n    }\n  }\n\n  reader.readAsArrayBuffer(file)\n}\n\n\/\/ \u751f\u6210\u8868\u683cHTML\uff08\u9884\u89c8\u7684\u91cd\u70b9\u5728\u4e8e\u6b64\u5904\uff09\nfunction generateTableHtml(worksheet) {\n  const range = XLSX.utils.decode_range(worksheet&#91;'!ref']);\n  let tableHtml = '';\n  for (let row = range.s.r; row &lt;= range.e.r; row++) {\n    tableHtml += '&lt;tr style=\"\">';\n    for (let col = range.s.c; col &lt;= range.e.c; col++) {\n      const cellAddress = XLSX.utils.encode_cell({ r: row, c: col });\n      const cell = worksheet&#91;cellAddress];\n      const cellValue = cell ? XLSX.utils.format_cell(cell) : '';\n      tableHtml += `&lt;td style=\"border: 1px solid #ccc; min-width:80px; text-align:center; font-size:16px; padding:3px 8px; color: #4e4f4f;\">${cellValue}&lt;\/td>`;\n    }\n    tableHtml += '&lt;\/tr>';\n  }\n  return tableHtml;\n}\n\n\/\/ \u7ed1\u5b9a\u70b9\u51fb\u4e8b\u4ef6\nconst clearButtonClickListener = () => {\n  clearUpload();\n};\n\nconst confirmButtonClickListener = () => {\n  if (isClickDisabled.value) {\n    return;\n  }\n  isClickDisabled.value = true;\n  handleConfirm()\n  isClickDisabled.value = false;\n};\n\n\/\/ \u6e05\u9664\u4e0a\u4f20\u6587\u4ef6\u4ee5\u53ca\u9884\u89c8\u6846\nconst clearUpload = () => {\n  var tableTitle = document.querySelector('.iwpp-file-table-box > h3') as HTMLElement;\n  var tableErrorP = document.querySelector('.iwpp-file-table-box > p') as HTMLElement;\n  var previewDiv = document.querySelector('.iwpp-file-table-preview') as HTMLElement;\n  var tableDiv = document.querySelector('.iwpp-file-table-btn') as HTMLElement;\n  tableTitle.style.display = 'none';\n  tableErrorP.style.display = 'none';\n  tableDiv.style.display = 'none';\n  previewDiv.style.display = 'none';\n  document.getElementById('iwpp-file-table').innerHTML = '';\n\n  tabelErrorMsg.value = '';\n  fileName.value = '';\n  if (uploadRef.value) {\n    uploadRef.value.clearFiles();\n  }\n};\n\n\/\/ \u4e0a\u4f20\u6587\u4ef6\u903b\u8f91\nconst handleConfirm = () => {\n  if(tabelErrorMsg.value.length > 0){\n    return ElMessage.error('\u8acb\u5148\u8655\u7406\u6587\u4ef6\u932f\u8aa4\u540e\uff0c\u518d\u9032\u884c\u4e0a\u50b3\uff01');\n  }\n\n  var file = currentFile.value;\n  var fileData = new FormData();\n  fileData.append('file', file);\n  let loadingInstance : any;\n  axios_post({\n    url: '\u4f60\u7684\u5730\u5740',\n    data: fileData,\n    headers: {\n      'Content-Type': 'multipart\/form-data'\n    },\n    onUploadProgress: progressEvent => {\n      if (!loadingInstance) {\n        loadingInstance = ElLoading.service({\n          lock: true,\n          text:  '\u6b63\u5728\u4e0a\u50b3\u6587\u4ef6...',\n          background: 'rgba(0, 0, 0, 0.7)',\n        });\n      }\n    }\n  }).then(res => {\n    if (loadingInstance) {\n      loadingInstance.close();\n    }\n    \/\/ \u4f60\u7684res\u5904\u7406\u903b\u8f91\n  }).catch(err => {\n    if (loadingInstance) {\n      loadingInstance.close();\n    }\n    \/\/ \u4f60\u7684err\u5904\u7406\u903b\u8f91\n  });\n\n};\n\n&lt;\/script>\n\n\n&lt;style lang=\"scss\" scoped>\n.iwpp-file-manage {\n    width: 100%;\n    height: 100%;\n    background-color: $bg;\n}\n\n.iwpp-file-container {\n  padding: 30px;\n\n  >h3:nth-of-type(1) {\n    font-size: 32px;\n    color: #eee;\n    margin-bottom: 20px;\n    padding-bottom: 10px;\n    border-bottom: 1px solid #eee;\n    user-select: none;\n  }\n\n  .iwpp-file-upload {\n    button {\n      width: 200px;\n      height: 40px;\n      font-size: 16px;\n    }\n\n    p {\n      font-size: 14px;\n      color: #eee;\n      margin-left: 15px;\n      user-select: none;\n    }\n  }\n\n  .iwpp-file-table-box {\n    >h3 {\n      font-size: 22px;\n      color: #4e4f4f;\n      padding: 20px 10px 10px;\n      background-color: #fff;\n      text-align: center;\n      margin-top: 20px;\n      display: none;\n    }\n    >p{\n      background-color: #fff;\n      font-size: 14px;\n      color:#cc0000;\n      text-align: center;\n      padding: 0 10px 10px;\n      display: none;\n    }\n\n    .iwpp-file-table-preview {\n      height: 500px;\n      background-color: #fff;\n      overflow: auto;\n      display: none;\n      padding:0 20px;\n    }\n\n    .iwpp-file-table-btn {\n      display: none;\n      text-align: right;\n      margin-top: 20px;\n\n      #clearButton {\n        margin-right: 20px;\n        width: 100px;\n        height: 36px;\n        font-size: 16px;\n        background-color: #dbdbdb;\n        color: #333;\n        border: none;\n        border-radius: 4px;\n        cursor: pointer;\n      }\n\n      #confirmButton {\n        width: 100px;\n        height: 36px;\n        font-size: 16px;\n        background-color: #409eff;\n        color: #fff;\n        border: none;\n        border-radius: 4px;\n        cursor: pointer;\n      }\n    }\n  }\n}\n&lt;\/style>\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u529f\u80fd\uff1a\uff081\uff09\u6587\u4ef6\u4e0a\u4f20\u65f6\u53ef\u4ee5\u9884\u89c8\u5185\u5bb9\u3002\uff082\uff09\u5bf9\u6587\u4ef6\u540d\u8fdb\u884c\u5224\u65ad\uff0c\u4e0d\u6ee1\u8db3\u6761\u4ef6\u65f6\u63d0\u793a\u9519\u8bef\u3002\uff083\uff09\u5bf9\u6587\u4ef6\u8868\u5934\u8fdb\u884c\u68c0\u6d4b\uff0c\u5982 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":806,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-799","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8 - YW<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.xinsk.cn\/?p=799\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8 - YW\" \/>\n<meta property=\"og:description\" content=\"\u529f\u80fd\uff1a\uff081\uff09\u6587\u4ef6\u4e0a\u4f20\u65f6\u53ef\u4ee5\u9884\u89c8\u5185\u5bb9\u3002\uff082\uff09\u5bf9\u6587\u4ef6\u540d\u8fdb\u884c\u5224\u65ad\uff0c\u4e0d\u6ee1\u8db3\u6761\u4ef6\u65f6\u63d0\u793a\u9519\u8bef\u3002\uff083\uff09\u5bf9\u6587\u4ef6\u8868\u5934\u8fdb\u884c\u68c0\u6d4b\uff0c\u5982 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.xinsk.cn\/?p=799\" \/>\n<meta property=\"og:site_name\" content=\"YW\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-16T02:17:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-16T02:49:43+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/04\/16638162153164160.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"890\" \/>\n\t<meta property=\"og:image:height\" content=\"501\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Randy\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"Randy\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#article\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799\"},\"author\":{\"name\":\"Randy\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/#\\\/schema\\\/person\\\/9b38368d42dd4db5d104a3df4deda634\"},\"headline\":\"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8\",\"datePublished\":\"2025-04-16T02:17:04+00:00\",\"dateModified\":\"2025-04-16T02:49:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799\"},\"wordCount\":6,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/#\\\/schema\\\/person\\\/9b38368d42dd4db5d104a3df4deda634\"},\"image\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/16638162153164160.webp\",\"articleSection\":[\"\u5176\u4ed6\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799\",\"url\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799\",\"name\":\"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8 - YW\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/16638162153164160.webp\",\"datePublished\":\"2025-04-16T02:17:04+00:00\",\"dateModified\":\"2025-04-16T02:49:43+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/www.xinsk.cn\\\/?p=799\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#primaryimage\",\"url\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/16638162153164160.webp\",\"contentUrl\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/04\\\/16638162153164160.webp\",\"width\":890,\"height\":501},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/?p=799#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\\\/\\\/www.xinsk.cn\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/#website\",\"url\":\"http:\\\/\\\/www.xinsk.cn\\\/\",\"name\":\"YW\",\"description\":\"Trying to be better\",\"publisher\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/#\\\/schema\\\/person\\\/9b38368d42dd4db5d104a3df4deda634\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/www.xinsk.cn\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/#\\\/schema\\\/person\\\/9b38368d42dd4db5d104a3df4deda634\",\"name\":\"Randy\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/cropped-pic7.jpg\",\"url\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/cropped-pic7.jpg\",\"contentUrl\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/cropped-pic7.jpg\",\"width\":214,\"height\":214,\"caption\":\"Randy\"},\"logo\":{\"@id\":\"http:\\\/\\\/www.xinsk.cn\\\/wp-content\\\/uploads\\\/2025\\\/02\\\/cropped-pic7.jpg\"},\"sameAs\":[\"http:\\\/\\\/106.15.105.35\"],\"url\":\"http:\\\/\\\/www.xinsk.cn\\\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8 - YW","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.xinsk.cn\/?p=799","og_locale":"zh_CN","og_type":"article","og_title":"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8 - YW","og_description":"\u529f\u80fd\uff1a\uff081\uff09\u6587\u4ef6\u4e0a\u4f20\u65f6\u53ef\u4ee5\u9884\u89c8\u5185\u5bb9\u3002\uff082\uff09\u5bf9\u6587\u4ef6\u540d\u8fdb\u884c\u5224\u65ad\uff0c\u4e0d\u6ee1\u8db3\u6761\u4ef6\u65f6\u63d0\u793a\u9519\u8bef\u3002\uff083\uff09\u5bf9\u6587\u4ef6\u8868\u5934\u8fdb\u884c\u68c0\u6d4b\uff0c\u5982 [&hellip;]","og_url":"http:\/\/www.xinsk.cn\/?p=799","og_site_name":"YW","article_published_time":"2025-04-16T02:17:04+00:00","article_modified_time":"2025-04-16T02:49:43+00:00","og_image":[{"width":890,"height":501,"url":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/04\/16638162153164160.webp","type":"image\/webp"}],"author":"Randy","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"Randy","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.xinsk.cn\/?p=799#article","isPartOf":{"@id":"http:\/\/www.xinsk.cn\/?p=799"},"author":{"name":"Randy","@id":"http:\/\/www.xinsk.cn\/#\/schema\/person\/9b38368d42dd4db5d104a3df4deda634"},"headline":"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8","datePublished":"2025-04-16T02:17:04+00:00","dateModified":"2025-04-16T02:49:43+00:00","mainEntityOfPage":{"@id":"http:\/\/www.xinsk.cn\/?p=799"},"wordCount":6,"commentCount":0,"publisher":{"@id":"http:\/\/www.xinsk.cn\/#\/schema\/person\/9b38368d42dd4db5d104a3df4deda634"},"image":{"@id":"http:\/\/www.xinsk.cn\/?p=799#primaryimage"},"thumbnailUrl":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/04\/16638162153164160.webp","articleSection":["\u5176\u4ed6"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["http:\/\/www.xinsk.cn\/?p=799#respond"]}]},{"@type":"WebPage","@id":"http:\/\/www.xinsk.cn\/?p=799","url":"http:\/\/www.xinsk.cn\/?p=799","name":"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8 - YW","isPartOf":{"@id":"http:\/\/www.xinsk.cn\/#website"},"primaryImageOfPage":{"@id":"http:\/\/www.xinsk.cn\/?p=799#primaryimage"},"image":{"@id":"http:\/\/www.xinsk.cn\/?p=799#primaryimage"},"thumbnailUrl":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/04\/16638162153164160.webp","datePublished":"2025-04-16T02:17:04+00:00","dateModified":"2025-04-16T02:49:43+00:00","breadcrumb":{"@id":"http:\/\/www.xinsk.cn\/?p=799#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.xinsk.cn\/?p=799"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.xinsk.cn\/?p=799#primaryimage","url":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/04\/16638162153164160.webp","contentUrl":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/04\/16638162153164160.webp","width":890,"height":501},{"@type":"BreadcrumbList","@id":"http:\/\/www.xinsk.cn\/?p=799#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.xinsk.cn\/"},{"@type":"ListItem","position":2,"name":"VUE3+TS+XLSX\u5b9e\u73b0Excel\u6587\u4ef6\u4e0a\u4f20\u5e76\u9884\u89c8"}]},{"@type":"WebSite","@id":"http:\/\/www.xinsk.cn\/#website","url":"http:\/\/www.xinsk.cn\/","name":"YW","description":"Trying to be better","publisher":{"@id":"http:\/\/www.xinsk.cn\/#\/schema\/person\/9b38368d42dd4db5d104a3df4deda634"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.xinsk.cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/www.xinsk.cn\/#\/schema\/person\/9b38368d42dd4db5d104a3df4deda634","name":"Randy","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/02\/cropped-pic7.jpg","url":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/02\/cropped-pic7.jpg","contentUrl":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/02\/cropped-pic7.jpg","width":214,"height":214,"caption":"Randy"},"logo":{"@id":"http:\/\/www.xinsk.cn\/wp-content\/uploads\/2025\/02\/cropped-pic7.jpg"},"sameAs":["http:\/\/106.15.105.35"],"url":"http:\/\/www.xinsk.cn\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/posts\/799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=799"}],"version-history":[{"count":4,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/posts\/799\/revisions"}],"predecessor-version":[{"id":804,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/posts\/799\/revisions\/804"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=\/wp\/v2\/media\/806"}],"wp:attachment":[{"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=799"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xinsk.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}