I think my reply this morning didn't go through ...
Yes, that looks like a JSON-format file, where items appear as key-value pairs. Try running it through a JSON-to-CSV converter and then importing it. I haven't used any of these, but here is one where you just upload the file, press the convert button, and download the resulting csv file.
------------------------------
Jon Peck
------------------------------
Original Message:
Sent: Wed September 27, 2023 12:00 PM
From: Jon Peck
Subject: Is there a way of tidying up this horrific txt file?
It's a little hard to tell, since the text has been mangled by passing it into SPSS in the wrong format, but I suspect that this text is actually in JSON format. So it would need to be converted to CSV or similar before importing it into SPSS (or Excel)
Can you post a sample of the file or at least an image before the import attempt?
--
Original Message:
Sent: 9/26/2023 9:45:00 AM
From: Seb Rumsby
Subject: Is there a way of tidying up this horrific txt file?
Hi there,
I'm a newbie to SPSS so am not sure whether the following is possible, or whether it will be a painstaking Excel job... I want to analyse this dataset which comes in a .txt file. However, upon closer inspection the formatting is horrible: each line contains more or less variables, with omitted variable names so that the columns don't line up when you try to import the data into SPSS (see screenshot).
Is there a way that I can shift certain values across to the right (from data view perspective) to line up all the addresses, all the postal codes, all the country lines etc.? Any ideas would be appreciated! Thanks
------------------------------
Seb Rumsby
------------------------------