docs.sheetjs.com/tests/cli/denosea.ps1
2026-01-28 23:58:19 -05:00

21 lines
670 B
PowerShell

#!/usr/bin/env pwsh
# https://docs.sheetjs.com/docs/demos/cli/denosea
$oldDir = Get-Location
$tempDir = Join-Path -Path $env:TEMP -ChildPath "sheetjs-cli-deno"
if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force }
New-Item -ItemType Directory -Path $tempDir | Out-Null
Set-Location -Path $tempDir
deno --version
curl -o pres.numbers https://docs.sheetjs.com/pres.numbers
deno run -r --allow-read --allow-import https://docs.sheetjs.com/cli/sheet2csv.ts pres.numbers
deno compile -r --allow-read --allow-import https://docs.sheetjs.com/cli/sheet2csv.ts
./sheet2csv pres.numbers
Set-Location $oldDir
Remove-Item -Path $tempDir -Recurse -Force