alexander-pick / MKMTool

MKMTool ist a helper application I wrote for tinkering around with optimization of sale processes on magiccardmarket.eu and the idea of automisation of some tasks most people wouldn’t be able to get done by pure manpower.
GNU Affero General Public License v3.0
65 stars 15 forks source link

Inventory export #15

Closed Brudolfer closed 3 years ago

Brudolfer commented 5 years ago

Erstmal vielen Dank für die Mühe, welche du dir hier machst!!! unbedingt weiter so!!!

Nach dem export des Inventars via deines Tools, ist es zwingend erforderlich die Daten mittels "Text in Spalten" aufzubereiten. Dabei entstanden jedoch einige Fehler, so stand zum Beispiel im "last edited" plötzlich bei einigen Karten "false" sowie im "price" bei manchen Karten die "condition"

"Richtig" aufbereiten konnte ich einen xml inventarexport bisher nur, wenn ich in der xml zuvor alle Punkte durch Kommata ersetze und erst dann via "Daten in Excel importieren" die Liste erstellen lies.

Oder mache ich Grundlegend etwas falsch?

mfg Unbenannt

Brudolfer

Brudolfer commented 5 years ago

Iam sorry,

just realized that i was writing in German, since Alexander Picks sounded German to me :D.

So i have a problem exporting my Inventory to Csv. After the Export the data has to be edited via "text into columns" after that some of the Data seem to be wrong to me. For example there were conditions (NM etc) in my "price" column

is there anything iam missing?

Sorry for Bad englisch :/

tomasjanak commented 5 years ago

Hi, thanks for the report, I see the mistake in the export code (it is treating "," in a card name as if it was a "," for separating columns), I will fix in the evening.

tomasjanak commented 5 years ago

Wait, actually looking at the code, it should be treated. I'm guessing the "text into columns" is what messes it up. What software are you using? Excel? In excel you shouldn't need to do anything as it should correctly open .csv files.

Brudolfer commented 5 years ago

First of all, Thank you very much for the fast response =)

Wait, actually looking at the code, it should be treated. I'm guessing the "text into columns" is what messes it up. What software are you using? Excel? In excel you shouldn't need to do anything as it should correctly open .csv files.

Iam Using Excel. But after i export it as csv it looks like this

Unbenannt3

tomasjanak commented 5 years ago

It is strange that the first column (the card name) is not in quotation marks like the rest, that is why the commas are treated as separators. But I double checked and MKMTool is exporting it with the the quotation marks...if you open it in some text editor (like notepad), do the card names have quotation marks around them?

Edit: OK, so it's just what excel does when it does not automatically recognizes the separator (comma in this case). So you will have to use the "data from file" feature in excel and specify that comma is the separator, then it should open OK. See tutorial for example here: https://www.hesa.ac.uk/support/user-guides/import-csv

tomasjanak commented 5 years ago

BTW, I had the same issue with the exportBuys because that file uses semicolon (';') as the delimiter. Apparently excel uses the "list separator" character as the default delimiter, which you can change in your windows settings (details https://superuser.com/questions/606272/how-to-get-excel-to-interpret-the-comma-as-a-default-delimiter-in-csv-files). I guess in Germany the default separator is ';', while in the English locale that I am using it is ','. So the exportBuys, which was written by Alexander, it is exported using ';', while the parts that were written by me, like the export inventory, the delimiter is ','. Maybe if I ever feel like it I will make it so that all the CSV files are exported using whatever is the local separator. For now, people will have to convert it themselves.

Brudolfer commented 4 years ago

Hey There =)

i Tried to Strg+a Strg+c Strg+v the whole Inventory into excel to sort out the errors.

Then i realized sth strange.

Whenever i Copy the following line

image

and copy the 2.49 into excel it transfers to "Feb 49" everytime.

Had the Same issue with a couple of Cards. After declaring the cell as "currency" it transfers to "17930,00"

Any ideas?

mfg Brudolf

-- EDIT: Same Issue.. exportet it to Notepad and replaced "." with "," after that i could copy it to excel =)

tomasjanak commented 4 years ago

Hello, I think as long as you have comma as your system's decimal separator it will always do some strange conversions. Instead of strg+c/strg+v, you should use the "import data" function: you click Data -> Get External Data -> From Text -> Select the .csv file exported from MKMTool -> click next -> Choose comma as separator -> click next -> Click the "advanced" button and set "." as decimal separator and empty space as the thousands separator -> click finish. Here is a guide in german: https://blogs54.de/blog/2015/05/csv-in-excel-richtig-importieren-so-gehts/ but it is missing the part about changing the decimal separator, without it excel will keep trying to convert the numbers to date.