The Tournament Director Forums

Main => Beta Testing => Topic started by: jodybingo on September 23, 2010, 09:42:10 PM

Title: export feature on players tab
Post by: jodybingo on September 23, 2010, 09:42:10 PM
HI Corey, I came across an issue that is not TD2 related but may have caused me some issues later on. When I exported my players results from the Players Tab, the .csv file created produced an error. Excel indicated that it was a "SYLK" file and could not be opened. A quick google search turned up the issue. When the first two characters of a csv file are "I" and "D" in capital letters excel thinks it is an SYLK file.
I have moved my columns around so that the first column is not the ID of the player and the error disappeared. To prevent others from possibly panicking could you either have TD2 export the "ID" characters in lowercase or prevent "ID" from being the first problem?
Jody
Title: Re: export feature on players tab
Post by: Corey Cooper on September 24, 2010, 10:31:39 AM
That's fascinating.  Here's the relevant Knowledge Base article: http://support.microsoft.com/kb/323626

I'll change the export to put the column headers in quotations.  Should fix it.  Thank you for the heads-up!
Title: Re: export feature on players tab
Post by: jodybingo on September 24, 2010, 03:26:35 PM
Just a note (because I am not a microsoft fanatic) the file opens without error in OpenOffice
Title: Re: export feature on players tab
Post by: Corey Cooper on September 24, 2010, 03:56:41 PM
Yeah, it's an Excel-specific thing, it appears.  The thing is, it's perfectly valid (and not a bad idea) to place quotations around each cell's data in a CSV file.  It's only necessary if the data contains a comma, because without the quotes the comma would confuse the column separation.  For efficiency's sake (and human legibility), the quotes are only used when necessary.  I've changed all of the export code to always use quotes for the first line of the file, thus eliminating the issue without affecting anything else.