When you import data into a SharePoint list, the order of choice column options can shift unexpectedly. This happens because the import process treats the choice values as a flat list and may reorder them alphabetically or by internal ID. This article explains why the order changes and provides a method to preserve the original sequence during and after import.
The root cause is that SharePoint’s import tools, including Excel and CSV imports, do not respect the custom order you set in the column settings. Instead, they append new values or sort them based on the data source. You can prevent this by preparing the target list correctly and using a specific import workflow.
This article covers the technical cause, a step-by-step fix using PowerShell, and common mistakes to avoid. After reading, you will be able to import choice data without losing the intended display order.
Key Takeaways: Preserving Choice Column Order on Import
- Site Settings > List Settings > Choice Column: Define the exact order of choices before importing any data.
- PowerShell with PnP.PowerShell: Use the Set-PnPChoiceColumn cmdlet to reorder choices after import if the order is lost.
- CSV import with ID mapping: Include the internal choice ID in your import file to match existing values and avoid reordering.
Why Choice Column Order Changes After Import
SharePoint choice columns store options in a specific sequence that you define in the column settings. When you import data from Excel or a CSV file, the import engine does not read the column’s existing order. Instead, it processes each row and either appends new choices to the end of the list or sorts them alphabetically. This behavior is by design because the import tool treats the choice column as a simple text field, not as a structured list with a predefined order.
The internal storage of choice values uses an array. When new values are added during import, SharePoint rebuilds the array and may sort it. The sorting rule depends on the import method:
- Excel Import (Quick Import): Appends new values in the order they appear in the spreadsheet. Existing values stay in their original position, but the combined list may not match your intended order.
- CSV Import (via PowerShell or third-party tools): Often sorts the entire choice list alphabetically after the import finishes.
- SharePoint Migration Tool (SPMT): Preserves the order from the source list only if the source is another SharePoint list. If the source is a CSV file, it behaves like a CSV import.
The order change is not a bug. It is a side effect of how the import process handles metadata. To prevent it, you must predefine the exact order in the target column and ensure that the import file only uses values that already exist in that order.
Prerequisites for Preventing Order Changes
Before you start the import, complete these steps:
- Create the target SharePoint list with the choice column already defined. Do not create the column during import.
- Set the choice options in the exact order you want them to appear. Go to List Settings > Column > Choice Column > Edit Column. Under “Type each choice on a separate line”, enter the options in the desired sequence. Use the up and down arrows to reorder them.
- Prepare your import file (Excel or CSV) so that the choice column contains only values that match one of the predefined options. Any new value not in the list will be added at the end or cause an error.
Steps to Preserve Choice Column Order During Import
Follow these steps to import data without losing the choice column order. This method uses Excel for the import and PowerShell as a backup if the order still shifts.
- Define the exact choice order in the target list
Open the SharePoint list. Click the gear icon and select List Settings. Click the choice column name. Under “Type each choice on a separate line”, enter the options in the order you want. Click Save. This sets the baseline order. - Export the target list to get the internal choice IDs
If you are importing many rows, use PowerShell to export the choice column’s internal IDs. Run:Get-PnPChoiceColumn -List "YourListName" -Identity "ChoiceColumnName" | Select Choices. This returns the choices with their internal index numbers. The index starts at 0. Note the index for each choice value. - Prepare the import file with existing values only
Open your Excel or CSV file. In the choice column, replace any new or misspelled values with the exact text from the predefined list. Do not add new values. Save the file as .xlsx or .csv. - Import the file using the SharePoint Quick Import
In the target list, click Quick Edit (grid view) or use the Import from Excel option. Paste or upload the data. SharePoint will match the choice values to the existing column options and keep the order intact because no new values are added. - If the order still changes, run a PowerShell fix
Connect to SharePoint with PnP.PowerShell:Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/yoursite. Then run:Set-PnPChoiceColumn -List "YourListName" -Identity "ChoiceColumnName" -Choices @("FirstChoice","SecondChoice","ThirdChoice"). Replace the array with your exact order. This resets the order without affecting existing data.
Alternative Method: Use a Lookup Column Instead
If you frequently import data and need strict order control, consider replacing the choice column with a lookup column that references a separate list of options. The lookup column always displays items in the order defined in the source list. Create a list named “ChoiceOptions” with a single text column. Add the options in the desired order. In your main list, add a lookup column that points to ChoiceOptions. During import, map the choice values to the lookup IDs. This method prevents any reordering because the lookup order is tied to the source list.
Common Mistakes and Limitations
Import File Contains New Choice Values Not in the Target List
If your import file includes a choice value that does not exist in the target column, SharePoint adds it to the end of the list. This shifts the order of all subsequent values. To fix this, delete the new value from the column settings after import, or run the PowerShell fix to restore the original order.
Using the SharePoint Migration Tool with a CSV Source
The SharePoint Migration Tool (SPMT) does not preserve choice order when the source is a CSV file. It treats the choice column as plain text and appends values in the order they appear in the CSV. To avoid this, convert the CSV to a SharePoint list first, then use SPMT to migrate the list to another site. The list-to-list migration preserves the order.
Choice Column with “Allow Fill-in Choices” Enabled
When “Allow fill-in choices” is turned on, users can type custom values. During import, these custom values are treated as new choices and appended to the list. To prevent order changes, disable this setting before import. Go to List Settings > Column > Choice Column > Edit Column. Uncheck “Allow fill-in choices”. Import the data. Re-enable the setting if needed.
PowerShell Permissions Required
The Set-PnPChoiceColumn cmdlet requires at least Edit permissions on the list. If you receive an access denied error, ask your SharePoint admin to grant you the necessary permissions or run the script from an admin account.
Choice Column Order Preservation Methods Compared
| Item | Predefine Order + Import Existing Values | PowerShell Reset After Import | Lookup Column Alternative |
|---|---|---|---|
| Effort | Low — requires careful file preparation | Medium — requires PowerShell knowledge | High — requires creating a separate list |
| Order reliability | High if no new values are introduced | Very high — resets order exactly | Very high — order is tied to source list |
| Best for | One-time imports with clean data | Recurring imports where order shifts | Frequent imports with dynamic options |
| Limitation | Does not handle new values | Requires admin permissions | Adds complexity to list structure |
After reading this article, you can import data into SharePoint choice columns without losing the intended display order. Start by defining the exact choice sequence in the target list before any import. If the order shifts despite your preparation, run the Set-PnPChoiceColumn PowerShell cmdlet to restore it. For ongoing imports, consider replacing the choice column with a lookup column for more reliable order control. As an advanced tip, use the internal choice index in your import file to map values directly and avoid any reordering.