test content
What is the Arc Client?
Install Arc

Issues with /ExportGuildMemberList command

blueflame4444blueflame4444 Member Posts: 7 Arc User
edited July 2015 in PC Gameplay Bug Reports
First off, I'd like to say that I'm really happy that this command has been put into the game. It makes administering demotions and promotions to fleets a breeze. However, there are some serious issues with the resulting file.

tl;dr - Escape commas in CSV files!

Issues #1 and #2
Comments in the game are allowed to have commas in them. In a Comma-Separated Values file (C-S-V), columns are delimited using commas. Since the in-game comments are not escaped in any way, this results in commas in the in-game comments being interpreted (as they should be) as new columns by programs reading these files. This issue affects both the public comments (#1) and officer comments (#2).

Due to the possible presence of extra commas in the file, it can be difficult for a program to parse the generated file. In order to find the user's public comment, you have to concatenate the last portion of the row into one string in order to get the whole comment. An example would be:

The row read by the program has 14 columns.
A row should have 12 columns.
Since the comment edit date is the last column, the comment edit date is in column 14 (where numbering starts at column 1) ergo the public comment will be from column 11 to column 13, inclusive.

Simple, right?

However, when an officer exports the list, the situation changes. Now, if a person has an officer comment containing commas, then things get tricky. If a row has more than 15 columns (the number it should have for officer exports), it's very difficult to tell where the public comment ends and the officer comment begins.

Issue #3
This issue deals mainly with the style of the file, and also with the above two issues. When an officer exports the file, three new columns are added. However, if a person cannot have an officer comment (i.e. is an officer in the fleet), then the row will not be padded with extra commas but will just be left as it is. If their public comment contains commas, the row length will be longer and if it is longer than 14 columns it may be confused with officer comments.

Comments

  • ladygadflyladygadfly Member Posts: 29 Cryptic Developer
    We are aware of this issue. Thanks for the report!
  • blueflame4444blueflame4444 Member Posts: 7 Arc User
    I did some testing in Excel, and it will honour quotation marks used to escape commas (and quotation marks used therein to escape quotation marks) provided that they are formatted like:

    "Column 1","Column 2 ""This is a quote"" "

    As opposed to

    "Column 1", "Column 2" (Space between the columns)
  • swamarianswamarian Member Posts: 1,506 Arc User
    Another issue is that Excel 2013 REALLY wants a space before the AM/PM in a date. In other words, "9/9/2012 9:26:11PM" is a string, and "9/9/2012 9:26:11 PM" is a date.
  • blueflame4444blueflame4444 Member Posts: 7 Arc User
    That's not an issue with the export, just with Excel. You can change the date format that Excel will accept through one of the menus (I forget how, but I know it's there).

    And though Cryptic fixed the commas in this update, they broke quotation marks! In order for quotes to work within quotes in a CSV, they must be replaced with two quotes. An example:

    The comment:
    "Live Long and Prosper" - Spock

    Must be written to the CSV file as:
    """Live Long and Prosper"" - Spock"
Sign In or Register to comment.