npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pv-exporter

v1.1.5

Published

To install this package, go to package.json and then add

Downloads

18

Readme

Installation

To install this package, go to package.json and then add

"pv-exporter": "git+ssh://[email protected]:privage/excelexporter.git#latest"

to the dependencies

Using with WebPack

add this code to webpack config to avoid webpack error

externals: [
    { './cptable': 'var cptable' }
]

Code Example

const Exporter = require('pv-exporter')

const Sheet = Exporter.Utils.Sheet
const Cell = Exporter.Utils.Cell
const Enum = Exporter.Utils.Enum
const Style = Exporter.Utils.Style
const ColumnStyle = Exporter.Utils.ColumnStyle
const Range = Exporter.Utils.Range

// create cell style
const style = new Style()
style.setFormat(Enum.FORMAT.GENERAL)
.setFontFamily('Calibri')
.setFontColor('FFFF0000') // red color in ARGB format
.setHorizontal(Enum.STYLE.HORIZONTAL_ALIGNMENT.CENTER)
.setVertical(Enum.STYLE.VERTICAL_ALIGNMENT.CENTER)
.bold(true)
.underline(true)
.italic(true)
.strike(true)
.outline(true)
.shadow(true)
.wrapText(true)
.setBackgroundColor('FF000000') // black color in ARGB format
.setBorderLeftStyle(Enum.STYLE.BORDER_STYLE.THIN)
.setBorderTopStyle(Enum.STYLE.BORDER_STYLE.THIN)
.setBorderRightStyle(Enum.STYLE.BORDER_STYLE.THIN)
.setBorderBottomStyle(Enum.STYLE.BORDER_STYLE.THIN)
.setBorderLeftColor('FF00FF00') // green color in ARGB format
.setBorderTopColor('FF00FF00') // green color in ARGB format
.setBorderRightColor('FF00FF00') // green color in ARGB format
.setBorderBottomColor('FF00FF00') // green color in ARGB format

const borderLeftStyle = new Style()
borderLeftStyle
    .setBorderLeftStyle(Enum.STYLE.BORDER_STYLE.THIN)
    .setBorderLeftColor('FF00FF00') // green color in ARGB format

const borderRightStyle = new Style()
borderRightStyle
    .setBorderRightStyle(Enum.STYLE.BORDER_STYLE.THIN)
    .setBorderRightColor('FF00FF00') // green color in ARGB format

// create cell
const blankCell = new Cell('')

// cell with style
const cell = new Cell()
cell.setValue('ทดสอบ')
cell.setStyle(style) // the setStyle method will replace the previous style of cell
cell.setType(Enum.CELLTYPE.STRING)

const unicodeCell = new Cell('ไทย')

const booleanCell = new Cell(true)
booleanCell.setType(Enum.CELLTYPE.BOOLEAN)

// if the value is date object,
// it will auto set cell type to DATE.
const dateCell = new Cell(new Date())

const multiAppliedStyleCell = new Cell()
multiAppliedStyleCell.applyStyle(borderLeftStyle)
multiAppliedStyleCell.applyStyle(borderRightStyle)
// or
multiAppliedStyleCell.applyStyle([borderRightStyle, borderLeftStyle])

// create sheet
const sheet = new Sheet()
sheet.setSheetName('ทดสอบ')

sheet.addNewRow()
sheet.appendCell(cell)
sheet.appendCell(blankCell)
sheet.appendCell(unicodeCell)

sheet.addNewRow()
sheet.appendCell(booleanCell)
sheet.appendCell(dateCell)
sheet.appendCell(multiAppliedStyleCell)

// create range for merge
const rowNumber = 3
const columnNumber = 0

const range = new Range()
range.setStart(rowNumber, columnNumber )
range.setEnd(rowNumber + 1, columnNumber + 1)
sheet.addMergeRange(range)


// create column style
const columnStyle = new ColumnStyle()
columnStyle.setWidth(16)
columnStyle.setCharacterWidth(128)
columnStyle.setMaximumDigitWidth(6)

const columnOne = 0
const columnTwo = 1
sheet.addColumnStyle(columnOne, columnStyle)
sheet.addColumnStyle(columnTwo, columnStyle)

// add sheet and download
const exporter = new Exporter.Exporter()
exporter.setEngine
exporter.addSheet(sheet)
const fileName = 'example'
exporter.download(fileName)