Git Product home page Git Product logo

customize-needs's Introduction

customize-needs

擁抱react community開發者提供的component,提升開發速度

同時能夠根據PM提出的需求高度客製!

from this:

1627392844102

to this: 1627393752073


download-file-by-sheetJs

專案需要將查詢後的資料輸出ods的功能 用sheet.js 將後端回傳的json資料 輸出成ods

1627395987539

var XLSX = require('xlsx');
const tableHead = ["項目一", "項目二", "項目三", "項目四", "項目五",  "項目六", "項目七"]
//輸出不需要Guid欄位-從陣列中刪除
   result.resultObject.blogs.forEach(function (v) { delete v.guid });
   if (result.isSucess) {
   if (typeof XLSX == 'undefined') XLSX = require('xlsx');
   var ws = XLSX.utils.json_to_sheet(result.resultObject.blogs);

   const wb = XLSX.WorkBook = XLSX.utils.book_new();
   //表格中項目名稱
   ws.A1.v = tableHead[0]
   ws.B1.v = tableHead[1]
   ws.C1.v = tableHead[2]
   ws.D1.v = tableHead[3]
   ws.E1.v = tableHead[4]
   ws.F1.v = tableHead[5]
   ws.G1.v = tableHead[6]


   XLSX.utils.book_append_sheet(wb, ws, "Table Export2");
   XLSX.writeFile(wb, `下載檔名_共${totalCount}筆.ods`);
 }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.