Droptext.cc

$p = "C:\Users\Acer\Desktop\ttt.xlsx"
Add-Type -AssemblyName System.IO.Compression.FileSystem

$z = [IO.Compression.ZipFile]::OpenRead($p)
$e = $z.GetEntry("xl/styles.xml")
$r = [IO.StreamReader]::new($e.Open())
[xml]$x = $r.ReadToEnd()
$r.Close()

$styles = $x.SelectNodes("//*[local-name()='cellXfs']/*[local-name()='xf']")

$style = $styles[12]

Write-Host "STYLE 12:"
Write-Host "numFmtId: $($style.GetAttribute('numFmtId'))"
Write-Host "applyNumberFormat: $($style.GetAttribute('applyNumberFormat'))"

$z.Dispose()


Views: 3, posted on: 2026-11-10