Export formatted Excel plugin Msexcel-builder

Source: Internet
Author: User
Tags install node

msexcel Generator (Msexcel-builder)

A small libraries authoring creates a Microsoft Office Excel (2007) file under the Nodejs.

A simple and fast libraries authoring creates an office Excel (>) xlsx file (compatible with the OpenOffice document format).

Characteristics:

Workbooks that support multiple worksheets.

Custom column widths and row heights, cell merging.

Custom cell styles, such as background color.

Custom cell border styles (such as thin, medium).

The font style (such as font, bold) of the custom cell.

Customize cell border styles and merge cells.


First, you need to install node. js.

Then install it in node. JS:

NPM Install Msexcel-builder

Then create a sample workbook with data.

//    Create A new workbook file   in current Working-path         var workbook = excelbuilder.   Createworkbook ('./',    'sample.xlsx  ')           //    Create  A new worksheet with 10 columns and 12 rows              var     sheet1     =     workbook   .    Createsheet    (    '    Sheet1    '     ,         ten    ,            )    ;   //    Fill Some data         sheet1   .    set    (    1    ,         1    ,         '    I  am title    '     )    ;           for         (    var     i     =         2    ;     i     <         5    ;     i    + +    )    Sheet1. Set (i,   1 ,   'test '  + I );  //    Save it     Workbook. Save (function(OK){     if (!   OK )  Workbook. Cancel ();   Else  Console. Log (' Congratulations, your workbook created    ');   });
RELATED Links: Https://www.npmjs.com/package/msexcel-builder





Export formatted Excel plugin Msexcel-builder

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.