Forum Discussion
cprothero
Sep 21, 2023Iron Contributor
Importing a List from CSV with Schema
I am trying to use the out-of-the-box functionality in Lists to export a list as a CSV with Schema, then reimporting the list to another site, but when I try to import the list, it does not recognize...
- Sep 21, 2023Actually I figured out the problem. If you open the exported csv in Excel, even if you do not touch the first row (schema), and even if you save it again as a csv, Excel messes up the schema by encapsulating it in quotes and escaping all the internal quotes. I understand why, but it is annoying.
I solved the problem by opening up the exported csv in notepad, removing the schema line and saving it. Then I can make all the adjustments needed in to the data rows in Excel and save the csv, then re-add the schema line to the beginning in notepad. Then, when I import it, everything works.
Easy mistake when I look at it now. But maybe it will help someone else.
SamJam55
Dec 01, 2023Copper Contributor
Yes, but it's not the editor's fault here. Regardless of how I open it (Notepad, Notepad++, VisualStudio Code), I'm not modifying the CSV. I'm even marking the files read-only before I inspect them.
The SharePoint export process is failing to add the necessary line break between the schema and the contents.
SamJam55
Dec 01, 2023Copper Contributor
Update:
I figured out the issue. Microsoft is not playing nicely with other browsers. I was using Firefox, but if use Edge to perform the export, the line break is properly placed in the CSV file.
Sigh ![]()
- TechAssistEntSep 22, 2024Copper ContributorYep, I always recommend using Edge for M365 services since Microsoft controls how Edge will work, but it can't control third-party browsers and how they format the data. Firefox is designed for having a custom User Interface, allowing you to override the standard design of websites and make everything look like you want (really awesome for people that are dyslexic and Comic Sans is the font to make everything easier to read, or if you are vision impaired and you need EVERYTHING in all caps and 24 font size or larger); but all the backend functions can't handle simple things like putting in a properly placed linefeed.
- VictorT2024Mar 24, 2024Copper Contributor
- SelormKFeb 15, 2024Copper ContributorThanks for this simple solution.