# 7 Data Store Java Script 02

7 Data Store Java Script 02 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-Table`

```powershell
# This shows how AllProperties switch behaves for different types
Import-Module .\PSWriteHTML.psd1 -Force

$DataTable1 = @(
    [ordered] @{ Test = 'Name'; Test2 = 'Name2'; Test3 = 'Name3' }
    [ordered] @{ Test = 'Name'; Test2 = 'Name2'; Test7 = 'Name3' }
    [ordered] @{ Test = 'Name'; Test2 = 'Name2'; Test5 = 'Name3' }
    [ordered] @{ Test = 'Name'; Test2 = 'Name2'; Test4 = 'Name3' }
)

New-HTML {
    New-HTMLTableOption -DataStore JavaScript

    # This is a bit special - when you use DataStoreID it uses single store in footer. However you need to make sure saved data is consistent between tables
    New-HTMLSection -Invisible {
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects' {
            New-HTMLTable -DataTable $DataTable1 -AllProperties -DataStoreID 'TableID1'
        }
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects - All Properties' {
            New-HTMLTable -DataTable $DataTable1 -AllProperties -DataStoreID 'TableID1'
        }
    }
    New-HTMLSection -Invisible {
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects' {
            New-HTMLTable -DataTable $DataTable1 -AllProperties -DataStoreID 'TableID2'
        }
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects - All Properties' {
            New-HTMLTable -DataTable $DataTable1 -DataStoreID 'TableID2'
        }
    }
    # This wouldn't work because first table doesn't save all columns, but only saves partial data, so if you request New-HTMLTable -AllProperties in 2nd table
    # It doesn't have all the required data (as it's already using content that we added earlier)
    # Don't do that - unless in future I will find a way around it - it's not to be touched :-)
    <#
    New-HTMLSection -Invisible {
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects' {
            New-HTMLTable -DataTable $DataTable1 -DataStoreID 'TableID3'
        }
        New-HTMLSection -HeaderText 'Standard Table with PSCustomObjects - All Properties' {
            New-HTMLTable -DataTable $DataTable1 -AllProperties -DataStoreID 'TableID3'
        }
    }
    #>
} -ShowHTML -FilePath $PSScriptRoot\Example7_DataStoreJavaScript02.html -Online
```

<!-- PowerForge markdown artifact sha256:F0824A4EC0A39D682EC54BF99EE6FED169EBE172832A681EF3B4B315505C79A4 -->
