Skip to content

Instantly share code, notes, and snippets.

View riskeez's full-sized avatar

Ilia Syrtsov riskeez

  • 01:28 (UTC +02:00)
View GitHub Profile
@gabceb
gabceb / ConvertXLS.ps1
Created May 3, 2011 22:36
Powershell script to convert all xls documents to xlsx in a folder recursively
$xlFixedFormat = [Microsoft.Office.Interop.Excel.XlFileFormat]::xlOpenXMLWorkbook
write-host $xlFixedFormat
$excel = New-Object -ComObject excel.application
$excel.visible = $true
$folderpath = "C:\Users\gabceb\Documents\testXLS"
$filetype ="*xls"
Get-ChildItem -Path $folderpath -Include $filetype -recurse |
ForEach-Object `
{
$path = ($_.fullname).substring(0, ($_.FullName).lastindexOf("."))