简体   繁体   中英

JS - Combining the SheetJS library with ExcelJS to be able to styling cells

I want to be able to style cells. In SheetJS it's possible to use this only in the pro version. This can be implemented in ExcelJS. When using JSON objects and generating a.xlsx file based on data from a page, am I able to transfer values and change the color of cells using ExcelJS (or something else)?

1. use fork: xlsx-styles

This is a community version of sheetjs that provide styles.

(Source: https://www.npmjs.com/package/xlsx-styles )

2. use sheetjs + xlsx-renderer

  1. parse data from a page by using sheetjs
  2. pipe data into xlsx-renderer

xlsx-renderer give you a possibility to style a template file inside Windows Excel, so any changes in template are quick and easy.

(Source: https://github.com/Siemienik/xlsx-renderer )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM