ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.

https://github.com/unvell/ReoGrid/issues

#1 2016-02-01 23:46:50

arlodvig
Member
Registered: 2015-12-24
Posts: 20

Data format for double

When the number of decimal is too large (eg log (11)) you can not see the whole part of the decimal number, but all

How to see the whole part and only the first decimal displayable in the width of the cell?

Offline

#2 2016-02-02 00:38:56

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Data format for double

You can set the number of decimal place digits by using SetRangeDataFormat method to specify a data format for the cell which has a big number.

sheet.SetRangeDataFormat("A1:B2", CellDataFormatFlag.Number,
  new NumberDataFormatter.NumberFormatArgs()
  {
    // decimal digit places, e.g. 0.1234
    DecimalPlaces = 11,
 
    // use separator, e.g. 123,456
    UseSeparator = true,
  });

See https://reogrid.net/document/data-format/

Offline

Board footer

Powered by FluxBB