Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
How for format cell as Number using $.ig.excel

Excel allows setting the cell format to Number with the decimal places specified. I'm not talking about using the Custom format. When "Format Cell..." is selected for a cell in Excel, under the Number tab there is an option of "Number" where you can then set the Decimal Places. Can this be done using the Ignite UI Excel support?

  • 54837
    Verified Answer
    Offline posted

    That essentially is a custom format. Whenever you are in the number tab of excel's format cells dialog the items you choose ultimately equate to a particular format string. When you are on the number tab and use the spin buttons you're just specifying the number of trailing 0's after the decimal place. You can see the actual format string by clicking on the Custom entry in the list and look at the text box on that tab. So for example if I were on the number format and choose 6 decimal places and then clicked the Custom entry in the list I'd see - "0.000000". That is the actual format string that excel is storing. So you would use the formatString method of the cell's cellFormat to specify that. e.g.