| .gitignore | ||
| config.json | ||
| ConfigForm.ps1 | ||
| EventHandlers.ps1 | ||
| GraphConfig.ps1 | ||
| Install-Dependencies.ps1 | ||
| MainForm.ps1 | ||
| README.md | ||
| SharePointFunctions.ps1 | ||
SharePoint XLS to XLSX Converter
This tool allows you to convert legacy .xls files stored in SharePoint to the modern .xlsx format. The converter maintains the original folder structure and automatically uploads the converted files back to SharePoint.
Installation Instructions
Step 1: Install PowerShell 7.5
Option 1: Manual Installation
- Visit the PowerShell GitHub releases page
- Download the appropriate installer for your system (e.g.,
PowerShell-7.5.0-win-x64.msifor 64-bit Windows) - Run the installer and follow the on-screen instructions
Option 2: Install using winget (Windows 10/11)
- Open a command prompt or PowerShell window
- Run the following command:
winget install --id Microsoft.PowerShell
Option 3: Install using PowerShell script
-
Open Windows PowerShell as administrator
-
Run the following commands:
# Download the installation script Invoke-WebRequest -Uri https://aka.ms/install-powershell.ps1 -OutFile install-powershell.ps1 # Install PowerShell 7.5 .\install-powershell.ps1 -UseMSI -Quiet -
Verify the installation by opening PowerShell 7 from the Start menu
Step 2: Install Required Dependencies
- Download the XLS to XLSX Converter files to a folder on your computer
- Right-click on PowerShell 7 in the Start menu and select "Run as administrator"
- Navigate to the folder containing the converter files:
cd C:\path\to\SharepointXLS_to_XLSX - Run the dependency installer script:
.\Install-Dependencies.ps1 - The script will install the required Microsoft Graph modules and verify that Excel is installed
Step 3: Configure Microsoft Graph Authentication
- The first time you run the application, you'll need to authenticate with Microsoft Graph
- Follow the prompts to sign in with your Microsoft 365 account that has access to the SharePoint site
Operating the Program
Starting the Application
- Open PowerShell 7 as administrator
- Navigate to the application folder:
cd C:\path\to\SharepointXLS_to_XLSX - Run the application in STA mode:
pwsh -STA -File .\MainForm.ps1
Using the Application
-
Configure SharePoint Settings:
- Enter your SharePoint site URL (e.g.,
https://yourcompany.sharepoint.com/sites/yoursite) - Enter the document library name (e.g.,
Shared DocumentsorDocuments) - Click "Save Config" to save these settings for future use
- Enter your SharePoint site URL (e.g.,
-
Connect to SharePoint:
- Click the "Connect" button to authenticate with SharePoint
- Follow any authentication prompts that appear
-
Select a Folder (Optional):
- Click "Browse" to navigate to a specific folder in SharePoint
- If no folder is selected, the application will work with files in the root of the document library
-
List XLS Files:
- Click "List XLS Files" to find all
.xlsfiles in the selected location - The files will be displayed in the grid at the bottom of the window
- Click "List XLS Files" to find all
-
Convert Files:
- Click "Convert to XLSX" to begin the conversion process
- The application will:
- Download each
.xlsfile - Convert it to
.xlsxformat using Excel - Upload the converted file back to the same location in SharePoint
- Download each
- Progress and status messages will appear in the text box on the right
Troubleshooting
- Authentication Issues: Ensure you have the correct permissions to access the SharePoint site
- Excel Errors: Make sure Microsoft Excel is installed and properly licensed
- File Access Errors: Check that you have permission to read and write to the SharePoint libraries
- Conversion Failures: Some very old or complex Excel files may not convert properly
Notes
- The application requires an active internet connection
- Large files may take longer to download, convert, and upload
- The original
.xlsfiles remain unchanged in SharePoint