Code Monkey home page Code Monkey logo

Comments (1)

pietersv avatar pietersv commented on June 30, 2024

@fturiot See the file /test/style-concise.js for an example of date formatting:

    // for some reason date formats only work if the fill is set
    sheet1.set(1, 4, new Date('04/01/2009') )
    sheet1.set(1, 5, {
      set: new Date('04/01/2009'),
      fill: {
        type: "solid",
        fgColor: "FFAA000"
      },
      numberFormat:"m/d/yy"
    } )

This library uses just the pre-defined number formats:

numberFormats: {
    0: 'General'
    1: '0'
    2: '0.00'
    3: '#,##0'
    4: '#,##0.00'
    9: '0%'
    10: '0.00%'
    11: '0.00E+00'
    12: '# ?/?'
    13: '# ??/??'
    14: 'm/d/yy'
    15: 'd-mmm-yy'
    16: 'd-mmm'
    17: 'mmm-yy'
    18: 'h:mm AM/PM'
    19: 'h:mm:ss AM/PM'
    20: 'h:mm'
    21: 'h:mm:ss'
    22: 'm/d/yy h:mm'
    37: '#,##0 ;(#,##0)'
    38: '#,##0 ;[Red](#,##0)'
    39: '#,##0.00;(#,##0.00)'
    40: '#,##0.00;[Red](#,##0.00)'
    45: 'mm:ss'
    46: '[h]:mm:ss'
    47: 'mmss.0'
    48: '##0.0E+0'
    49: '@'
    56: '"上午/下午 "hh"時"mm"分"ss"秒 "'
  }

from msexcel-builder.

Related Issues (17)

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.