#!/usr/bin/env pwsh # https://docs.sheetjs.com/docs/demos/engines/v8 $oldDir = Get-Location $tempDir = Join-Path -Path $env:TEMP -ChildPath "sheetjs-rustyv8" if (Test-Path -Path $tempDir) { Remove-Item -Path $tempDir -Recurse -Force } New-Item -ItemType Directory -Path $tempDir | Out-Null Set-Location -Path $tempDir cargo new sheetjs-rustyv8 Set-Location -Path "sheetjs-rustyv8" cargo run cargo add v8 cargo run Invoke-WebRequest -Uri "https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js" -OutFile "xlsx.full.min.js" Invoke-WebRequest -Uri "https://docs.sheetjs.com/pres.numbers" -OutFile "pres.numbers" Invoke-WebRequest -Uri "https://docs.sheetjs.com/v8/main.rs" -OutFile "src\main.rs" cargo run --release pres.numbers npx -y xlsx-cli sheetjsw.xlsb Set-Location $oldDir Remove-Item -Path $tempDir -Recurse -Force