I've created a csv but it is greyed out and wont import into practiscore 2 on my android phone


Image of csv opened in calc (I couldn’t upload a csv file).

I’m using the "Spreadsheet import - “Import Registration” option.

I tried to simply open the csv with practiscore but it doesn’t come up in either the ‘open with’ list, or in the “Share to” list.

I’m pretty new to this. My apoligies in advance if I’ve missed something obvious in the documentation.

Exploring what might be going on:
The file is generated in a react app that gets the csv from our club database. It appears in the Downloads folder.

If I open the file in a text editor, it looks fine. If I save it out from there to Downloads as a different file name (still with a csv extension) without making any changes, the new file imports into PS2 fine.

Continuing the investigation, the file I saved from the text editor is byte for byte identical to the one output from my app. It seems that there must be something in the file metadata that prevents PS2 from wanting to read the first one that is stripped off when I save a copy out from the text editor.

Continuing this investigation, I’ve found that if I save the file out of the app as a public file, rather than attempting to use the share utility, it works correctly.

This is a clunky UX for users. Ideally PS2 needs to register the csv mime type correctly (text/csv). I believe that is what is preventing PS2 from appearing as an application that can handle the file.

This is intentional. The CSV is a too common data format to have a globally registered application to handle it.

However to open a file in the app we have to rely on the platform-reported mime type for that given file. Otherwise you can choose a wrong unexpected file, e.g. a pdf instead of csv and we don’t really want to deal with that.

The app doesn’t let you open a CSV file, because its mime type is not a CSV. Whichever thing you used to save that file didn’t put a correct mime type metadata on it. When you do a file rename, e.g. “.csv" to ".csv.csv” in a file manager app, it fixes the mime type metadata and then file is recognized by the PS2 app.

Also all UI actions to save files out of PS2 app have two modes:

  • a short tap invokes the platform-native share actions (and whichever applications are registered for a given file mime type there)
  • a long tap invokes the platform-native save-to UI. This also allows to natively save to local folders, as well as to iCloud on iOS. On Android you can also save to different cloud sharing services if corresponding apps are installed (e.g. Google Drive, DropBox, OneDrive, etc), though those same apps are usually appear in the share option

Thanks for the detailed response.