# Locale Decimals

Locale Decimals on Evotec with practical examples, usage guidance, and reusable project workflows.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML)

Stars**1025**

Forks**115**

Open issues**0**

PowerShell Gallery downloads**7576901**

Release**v1.45.0**

Language: PowerShell Updated: 2026-11-19

Curated Examples

An example script from the PSWriteHTML repository.

- Source repository: [https://github.com/EvotecIT/PSWriteHTML](https://github.com/EvotecIT/PSWriteHTML)
- Example group: `Example-TableColumnHighlight`

```powershell
Import-Module .\PSWriteHTML.psd1 -Force

$htmlDot = @(
    [PSCustomObject] @{
        Item  = 'Pass threshold'
        Value = '0.17'
    }
    [PSCustomObject] @{
        Item  = 'Fail threshold'
        Value = '0.25'
    }
    [PSCustomObject] @{
        Item  = 'Exact threshold'
        Value = '0.20'
    }
    [PSCustomObject] @{
        Item  = 'Negative value'
        Value = '-0.05'
    }
)

$htmlComma = @(
    [PSCustomObject] @{
        Item  = 'Pass threshold'
        Value = '0,17'
    }
    [PSCustomObject] @{
        Item  = 'Fail threshold'
        Value = '0,25'
    }
    [PSCustomObject] @{
        Item  = 'Exact threshold'
        Value = '0,20'
    }
    [PSCustomObject] @{
        Item  = 'Negative value'
        Value = '-0,05'
    }
)

$jsDot = @(
    [PSCustomObject] @{
        Item  = 'Pass threshold'
        Value = 0.17
    }
    [PSCustomObject] @{
        Item  = 'Fail threshold'
        Value = 0.25
    }
    [PSCustomObject] @{
        Item  = 'Exact threshold'
        Value = 0.20
    }
    [PSCustomObject] @{
        Item  = 'Negative value'
        Value = -0.05
    }
)

$jsComma = @(
    [PSCustomObject] @{
        Item  = 'Pass threshold'
        Value = '0,17'
    }
    [PSCustomObject] @{
        Item  = 'Fail threshold'
        Value = '0,25'
    }
    [PSCustomObject] @{
        Item  = 'Exact threshold'
        Value = '0,20'
    }
    [PSCustomObject] @{
        Item  = 'Negative value'
        Value = '-0,05'
    }
)

$exampleCode = @'
New-TableCondition -Name "Value" -ComparisonType number -Operator le -Value 0.2 -Color SeaGreen -FailColor FireBrick
New-TableCondition -Name "Value" -ComparisonType number -Operator le -Value '0,2' -Color SeaGreen -FailColor FireBrick

# Avoid bare -Value 0,2 in PowerShell.
# PowerShell parses it as an Object[] containing 0 and 2.
'@

New-HTML -TitleText 'PSWriteHTML decimal number conditions' -Online -FilePath "$PSScriptRoot\Example-LocaleDecimals.html" {
    New-HTMLSection -HeaderText 'Locale decimal conditions' {
        New-HTMLText -TextBlock {
            'This example proves the same decimal comparison works for HTML-backed tables and JavaScript-backed tables.'
            'Use -Value 0.2 for a numeric literal, or quote locale-formatted text with -Value ''0,2''.'
            'Do not use bare -Value 0,2 in PowerShell because it becomes an Object[] before PSWriteHTML sees it.'
        }
        New-HTMLCodeBlock -Code $exampleCode -Style 'PowerShell' -Theme enlighter
    }

    New-HTMLSection -HeaderText 'HTML store with dot decimals' {
        New-HTMLTable -DataTable $htmlDot -Buttons copyHtml5, excelHtml5, csvHtml5, pdfHtml5 -PagingLength 5 {
            New-TableCondition -Name 'Value' -ComparisonType number -Operator le -Value 0.2 -Color SeaGreen -FailColor FireBrick
        }
    }

    New-HTMLSection -HeaderText 'HTML store with comma decimals' {
        New-HTMLTable -DataTable $htmlComma -Buttons copyHtml5, excelHtml5, csvHtml5, pdfHtml5 -PagingLength 5 {
            New-TableCondition -Name 'Value' -ComparisonType number -Operator le -Value '0,2' -Color SeaGreen -FailColor FireBrick
        }
    }

    New-HTMLSection -HeaderText 'JavaScript store with numeric values' {
        New-HTMLTable -DataTable $jsDot -Buttons copyHtml5, excelHtml5, csvHtml5, pdfHtml5 -PagingLength 5 {
            New-TableCondition -Name 'Value' -ComparisonType number -Operator le -Value 0.2 -Color SeaGreen -FailColor FireBrick
        } -DataStore JavaScript
    }

    New-HTMLSection -HeaderText 'JavaScript store with comma-formatted strings' {
        New-HTMLTable -DataTable $jsComma -Buttons copyHtml5, excelHtml5, csvHtml5, pdfHtml5 -PagingLength 5 {
            New-TableCondition -Name 'Value' -ComparisonType number -Operator le -Value '0,2' -Color SeaGreen -FailColor FireBrick
        } -DataStore JavaScript
    }
}
```

<!-- PowerForge markdown artifact sha256:828A0F7B9FF3D0D62126C97F8EB9758C1695EC8A85F8824AA3BB36E68F4311F6 -->
