Large Excel UD-Table Exports Broken in Edge/Chrome v132+

Product: PowerShell Universal
Version: 4.2.13
Environment: PowerShell 7.3.9
Hosting: IIS (Server 2019)

Overview

When doing an Export to Excel (of admittedly a lot of data) from Edge or Chrome version 132+, the downloaded file is all over the place and mostly blank.

We’ve tried many devices and it’s consistent - Edge or Chrome on v131 - all working great 100% of the time - Exports work flawlessly.

Upgrade to the latest version and the exports break as described below.

Edge - 132.0.2957.115, Chrome - 132.0.6834.83 in stable at the time of writing. This is the same in Dev and Beta versions of Edge too.

Most of our userbase have been updated to Edge 132 in the last week or so, and so this has brought it to our attention.

The headers are mostly missing and 50-95% of the rows are blank.

Repro Code

This is a very artificial example - all of the irrelevant niceties have been stripped away. In our actual pages, the data is being fetched from a SQL database.

New-UDTable -LoadData {
    $TableData = ConvertFrom-Json $Body
    1..$TableData.PageSize | ForEach-Object {
        @{
            Column1  = New-Guid
            Column2  = New-Guid
            Column3  = New-Guid
            Column4  = New-Guid
            Column5  = New-Guid
            Column6  = New-Guid
            Column7  = New-Guid
            Column8  = New-Guid
            Column9  = New-Guid
            Column10 = New-Guid
            Column11 = New-Guid
            Column12 = New-Guid
            Column13 = New-Guid
            Column14 = New-Guid
            Column15 = New-Guid
            Column16 = New-Guid
        }
    } | Out-UDTableData -Page $TableData.Page -TotalCount 50000 -Properties $TableData.Properties
} -ShowPagination -DisablePageSizeAll -Columns @(
    New-UDTableColumn -Property 'Column1' -IncludeInExport -DefaultSortColumn
    New-UDTableColumn -Property 'Column2' -IncludeInExport
    New-UDTableColumn -Property 'Column3' -IncludeInExport
    New-UDTableColumn -Property 'Column4' -IncludeInExport
    New-UDTableColumn -Property 'Column5' -IncludeInExport
    New-UDTableColumn -Property 'Column6' -IncludeInExport
    New-UDTableColumn -Property 'Column7' -IncludeInExport
    New-UDTableColumn -Property 'Column8' -IncludeInExport
    New-UDTableColumn -Property 'Column9' -IncludeInExport
    New-UDTableColumn -Property 'Column10' -IncludeInExport
    New-UDTableColumn -Property 'Column11' -IncludeInExport
    New-UDTableColumn -Property 'Column12' -IncludeInExport
    New-UDTableColumn -Property 'Column13' -IncludeInExport
    New-UDTableColumn -Property 'Column14' -IncludeInExport
    New-UDTableColumn -Property 'Column15' -IncludeInExport
    New-UDTableColumn -Property 'Column16' -IncludeInExport
) -ShowExport -ExportOption 'XLSX' -OnExport {
    foreach ($Index in 0..50000) {
        @{
            Column1  = New-Guid
            Column2  = New-Guid
            Column3  = New-Guid
            Column4  = New-Guid
            Column5  = New-Guid
            Column6  = New-Guid
            Column7  = New-Guid
            Column8  = New-Guid
            Column9  = New-Guid
            Column10 = New-Guid
            Column11 = New-Guid
            Column12 = New-Guid
            Column13 = New-Guid
            Column14 = New-Guid
            Column15 = New-Guid
            Column16 = New-Guid
        }
    }
}

We’re at a bit of a loss. This is Server-Side exporting as far as we know, so aren’t quite sure how the browser version is impacting the creation of the XLSX file which is ultimately downloaded.

None of the logs we’ve checked have shed any light on things. The Dashboard log itself shows nothing. The System logs show the connection and the transfer of bytes but not errors. IIS logs and event viewer logs show nothing of note.

Any light you can shed on this @adam?

Thanks!

We use an node library called SheetJS for this. It looks like we are using 0.17.4 and it looks like 0.18.5 is the latest. I haven’t dug through the release notes at all but maybe they fixed it.

We use this very lightly so upgrading shouldn’t be too bad if there are no breaking changes.

Feel free to open an issue if you’d like to see this library upgraded.

I’ve opened the issue as requested.

Having dug into this some more I can see that someone opened the below issue on the SheetJS issue tracker for a similar issue with a CSV file.

#3273 - Missing data in csv file after export data from JSON response - sheetjs - SheetJS

They noted that it started recently impacting Chrome and not Firefox etc.

The maintainers looked into it in their discord and discovered this to be a Chromium bug, which they’ve since reported.

They have suggested a workaround in the interim that you could possibly implement:

1 Like

They might get to it in Chromium before I can. :slight_smile:

Per chat with torne@, this looks pretty serious and seems like it’s going to affect everything. OK to stay 10% for Webview and respin tomorrow along with clank.

This also needs a merge to V8 M132 &M133 main branches.

Merge approved for M132 & M133, please see for branch details - Chromium Dash

Looks like they’ll have the fix for this through in the coming days and it’ll make it into a stable version before long. Appreciate your quick replies though :slightly_smiling_face: