Nodejs+ejsexcel do Excel complex export, merge cells

Source: Internet
Author: User
  • var ejsexcel = require (' Ejsexcel ');
  • var fs = require (' Fs-extra ');
  • The previous blog post has explained the export of Excel through Ejsexcel, through the creation of templates to export Excel, now need to merge cells, through the ejsexcel on git instructions, but also completed the export of Excel, because in the template by <%%> Can write arbitrary JS code, so the merge cell is also a case, now subdivide.
  • This is the code in the template, that is, JS judgment.
    5. This is the background JS code, as to determine whether to merge cells and how many cells to merge the code.
    6. This is the result of the merger, although the background code is not very concise, I pass in this one idea is that in Ejsexcel said is <%MERGECELLFN(c2:c3)%> merge C2 and C3 two units, In this way, the data can be written in the background, in the template to determine whether the match, and the need to merge the cells in the descendants of the logical processing, passed to the foreground; we don't know where we are. Data is what cells need to be merged and everything is live data.
  • Nodejs+ejsexcel do Excel complex export, merge cells

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.