Open SelwynChan opened 1 year ago
You can change the list separator in Windows by modifying the registry. Here are two scripts for you: one to change the list separator to the ASCII 31 character, and another to change it back to a comma.
Script 1: Change list separator to ASCII 31 character
@echo off
setlocal enabledelayedexpansion
set "list_separator=^%"
reg add "HKCU\Control Panel\International" /v "sList" /t REG_SZ /d "!list_separator!" /f
echo List separator changed to ASCII 31 character.
pause
Save the file as change_list_separator_to_ascii_31.bat
. Make sure to choose "All Files" in the "Save as type" dropdown.
Double-click the saved .bat file to run it and change the list separator to the ASCII 31 character.
Script 2: Change list separator back to a comma
@echo off
reg add "HKCU\Control Panel\International" /v "sList" /t REG_SZ /d "," /f
echo List separator changed back to a comma.
pause
Save the file as change_list_separator_to_comma.bat
. Make sure to choose "All Files" in the "Save as type" dropdown.
Double-click the saved .bat file to run it and change the list separator back to a comma.
Please note that these scripts modify the Windows registry. It's a good idea to create a backup of your registry before making any changes. Also, you might need to restart your computer or log off and back in for the changes to take effect.
To change the delimiter in Excel, you can create a registry key that sets the delimiter to ASCII 31 (Unit Separator). Here is a script to change the delimiter to ASCII 31, and another to change it back to a comma.
Change delimiter to ASCII 31:
Save the following content in a file named
change_delimiter_to_ascii31.reg
:Change delimiter back to comma:
Save the following content in a file named
change_delimiter_to_comma.reg
:Instructions:
change_delimiter_to_ascii31.reg
andchange_delimiter_to_comma.reg
.change_delimiter_to_ascii31.reg
file to change the delimiter to ASCII 31. You'll be prompted to confirm that you want to add the information to the registry. Click "Yes" to confirm.change_delimiter_to_comma.reg
file and confirm the action as before.Please note that the provided scripts assume that you are using Office 2016 (Excel version 16.0). If you are using a different version of Office, replace
16.0
in the registry path with your version number (e.g.,15.0
for Office 2013,14.0
for Office 2010, etc.).