Question

J'ai une colonne numérique dans une liste qui affiche comme ceci:

16,090

Je voudrais à l'affichage sans la virgule:

16090

Peut-on faire?

Était-ce utile?

La solution

I think the only way is to use a calculated column for the display, =TEXT(Number_Column,"0")

Edit: Unless you're using a DVWP and have control over the output, then you can format it how ever you need to in the XSLT markup.

Autres conseils

Numeric formats are determined by your locale settings. So, for instance, if you are using locale 1033 (en-us), you'll see numbers displayed with the comma separator by default. You can change your locale settings, but that will change the formatting at the level where you make the change.

Otherwise, a calculated column or a DVWP are ways to go, as Eric mentions. Keep in mind that displaying numbers inconsistently may well add up to a poor UX.

Another option is to use an Integer field type, rather than a Number field type.

Unfortunately you cannot create an integer field through the browser, but it's pretty easy to do programmatically

Here's a short powershell script that will do the trick

$web=get-spweb http://urltosite
$list = $web.Lists["MyListName"]
$list.Fields.Add("MyIntFieldName", [Microsoft.SharePoint.SPFieldType]::Integer, $false)
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top