Bug:
Fleet CSV exports are useless if somebody puts a comma in their status message, member comment, and presumably if one is put into the officer notes.
Description:
I've been testing the fleet member list export feature on tribble, and it works, however, it has a problem. The export is effectively useless if a comma is used in any of the fields. The CSV format clearly specifies how to handle such cases.
Assuming comma as separator and quotation mark as, well, quotation symbol, as well as three fields, called F1, F2 and F3, respective values being a number, a string and another number, this is how the in-game exporter behaves:
Input data:
F1 = 3
F2 = data "," data , data
F3 = 4
In-game exporter produces output similar to this:
3,data "," data , data,4
Whereas the output should look like this:
3,"data "","" data , data",4
This is important, since there are a lot of players who have those symbols in their member comments, statues or officer notes, and it breaks the export, and I know that this feature will be used extensively.
Additionally, I'd have one more request to make.
The dates in the CSV are exported in US format (MM/dd/yyyy hh:mm am/pm). Is it possible to export them in ISO-8601 format (yyyy-MM-ddTHH:mm:ss+Z) or at least ISO-8601-ish format (something like yyyy-MM-dd HH:mm)?
How to reproduce:
- Join a fleet
- Open fleet panel, navigate to roster
- Put any message, that includes a comma, in your comment
- Use /ExportGuildMemberList whatever command
- The resulting CSV is not escaped, and hence the line with your character contains one more field, and the entire document is invalid
Regards
Comments
STO Resources: <Ship Comparison - All Tiers + Small Craft + Hangar Pets> <Damage Resistance>
<R&D + Upgrade Costs> <Duty Officer Finder> <Suliban Doff Reqs> <Fleet Costs> <Rep Costs>
<Keybind Tour the Galaxy> <Fleet / Armada Management> <Currency Exchange> <Other STO Links>
I see the problem with the commas. Each one splits the data into another cell, so all the comment info no longer lines up in the columns it's supposed to be in.
STO Resources: <Ship Comparison - All Tiers + Small Craft + Hangar Pets> <Damage Resistance>
<R&D + Upgrade Costs> <Duty Officer Finder> <Suliban Doff Reqs> <Fleet Costs> <Rep Costs>
<Keybind Tour the Galaxy> <Fleet / Armada Management> <Currency Exchange> <Other STO Links>
Thing is, I suspect that the parser simply joins the data with commas, without using any actual CSV library to export it. The CSV standard is clear on how to escape special cases.
Another thing is, the command itself should say "/ExportGuildMemberList <filename>" instead of "/ExportGuildMemberList <string>" when the argument is not supplied. It's confusing the way it is.
as for the command "issue" of "/ExportGuildMemberList <string>" vs "<filename>"... the file name is a "string" in a command format.
"field, with a comma"
field, with a comma
The former reads as a single field, the latter as two fields.
Try: You can then find the file Test.csv in your regular STO program folder.
STO Resources: <Ship Comparison - All Tiers + Small Craft + Hangar Pets> <Damage Resistance>
<R&D + Upgrade Costs> <Duty Officer Finder> <Suliban Doff Reqs> <Fleet Costs> <Rep Costs>
<Keybind Tour the Galaxy> <Fleet / Armada Management> <Currency Exchange> <Other STO Links>
White text on light-yellow background... Congratulations to whoever designed those forums.
It looks fine to me, but I'm also using the PWE Forums Enhancement Extension.
STO Resources: <Ship Comparison - All Tiers + Small Craft + Hangar Pets> <Damage Resistance>
<R&D + Upgrade Costs> <Duty Officer Finder> <Suliban Doff Reqs> <Fleet Costs> <Rep Costs>
<Keybind Tour the Galaxy> <Fleet / Armada Management> <Currency Exchange> <Other STO Links>
emzi, I agree with you on that point... tested it by copying that to a text file and saving it as a .csv and then opening in Excel...
However, how does the fleet roster export fields like the member comments or MOTD fields... with or without quotes.
If it's without as I am suspecting from the comments made, it will separate the comment into multiple fields.
STO Resources: <Ship Comparison - All Tiers + Small Craft + Hangar Pets> <Damage Resistance>
<R&D + Upgrade Costs> <Duty Officer Finder> <Suliban Doff Reqs> <Fleet Costs> <Rep Costs>
<Keybind Tour the Galaxy> <Fleet / Armada Management> <Currency Exchange> <Other STO Links>
It would look like """Warp five, engage!""" (note the triple quotes) and would not break CSV that way.
It exports them without proper quoting. The entire exporter is, I believe, not a proper CSV exporter, but rather a piece of code that glues some strings with commas. While this works for regular cases, it breaks the file when a comma is in the status or comment, which, when imported in a program like Excel, behaves like separate fields, and not a single field.