Deckstats Forum

English-language Forums => About Deckstats => Deckstats Feedback => Topic started by: paramerius on April 10, 2021, 12:56:02 pm

Title: Importing collection exported from deckstats
Post by: paramerius on April 10, 2021, 12:56:02 pm
Hi, I exported my collection to divide it into two CSV files (made copy of the original and left only the first line, then copy and paste from one to the other file) and now I can't import either of them. It says:

Error: Unexpected number of separators in line #1. If the card name contains a comma, try to enclose it in quotation marks. If it contains a quotation mark, add a backslash in front of it like this: \"

 How can i do it then? the first line from CSV looks like this:

amount,card_name,is_foil,is_pinned,set_id,set_code,collector_number,language,condition,comment,added
Title: Re: Importing collection exported from deckstats
Post by: Nils on April 10, 2021, 01:08:15 pm
"Line #1" refers to the first line of data, so the one following the header line that you pasted here. What does that one say?
Title: Re: Importing collection exported from deckstats
Post by: paramerius on April 10, 2021, 01:08:56 pm
8,"Swamp (https://cards.deckstats.net/magiccard.php?utf8=1&lng=en&card=Swamp)",,,"","M21","268","","","",""

And that one wasn't even edited at all
Title: Re: Importing collection exported from deckstats
Post by: Nils on April 10, 2021, 01:33:32 pm
Can you send me a copy of the entire file? Either as an attachment here or via email.
Title: Re: Importing collection exported from deckstats
Post by: paramerius on April 10, 2021, 01:46:08 pm
"original file" is just an exported collection, the other two files are the modified ones i can't import.
Title: Re: Importing collection exported from deckstats
Post by: Nils on April 10, 2021, 06:33:11 pm
It looks like something messed up the formatting when you created the new files. For example, the first line of collection.csv is actually this:

"8,""Swamp (https://cards.deckstats.net/magiccard.php?utf8=1&lng=en&card=Swamp)"",,,"""",""M21"",""268"","""","""","""","""""

All of those extra quotation marks are causing the problems. You can have a look at the files with a plain text editor like Notepad to see for yourself.
Title: Re: Importing collection exported from deckstats
Post by: paramerius on April 10, 2021, 06:40:46 pm
Thanks, now I think I know what to do.

Edit: that was painful for my eyes but here is the solution that worked.
1. Using ctrl+H in excel delete every quote (") from the file
2. Using ctrl+H change every comma (,) to semicolon (;)
3. Manually change every semicolon in card names back to comma (that was a pain with 2999 lines of text)
4. Use Text to Column tool and separate the text using semicolon as separator.
5. You can now safely import your CSV file choosing semicolon as separator in importing tool on website.