MobileSheets Forums

Full Version: Exporting files for CSV re-import
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
In case you have edited lots of meta-data in MSP that you want to make available for other users or you want to remove a fakebook from your library and keep the meta-data for later  import of single songs from it or ...:
It is possible to create a CSV file out of MSP that can be used for CSV import later.
To do that go to "Settings - Generate Song List Format" and set the song list format to something like 
The trick is to use a separator like ; that is valid for CSV import and to remove the blanks after the separator that MSP inserts automatically. Set "Show Setlist Title" to OFF.
(You might want to copy the songlist format line into a text  file to store several versions for different purposes)
Then create a setlist of the songs you want to include in your CSV file and export a setlist file via "Generate Song List". Save that song list into a file.
To make that file a valid CSV file for CSV import insert a title line that corresponds with the songlist format that you used. For the example above that would be
and the CSV is ready to be used for CSV import and to be shared in the MSP forum - thank you in advance.
And here's my feature request for Mike:
Please let a copy of the song list format line be a valid and working title line for CSV import. If it is possible to just copy and paste the song list format into the exported file the process described above would be much easier and less error-prone.
Yes! It's a great idea to create CSV and PDF form setlist or filter for reimport.
And if possible please include all audio files to an additional document (for example ZIP-File) with with restore option driven by CSV.
I should be able to support this, but it does require that I do a translation of sorts between the keywords that are used for the format line and the keywords I expect (PAGE_ORDER to pages, SOURCE_TYPES to sourcetypes, etc). That's not going to be difficult, so if this is useful, I have no problem adding it for the next update.
In theory this should all work in the next update. It would definitely help to get some more people testing it, so hopefully you can provide feedback.

In general it works. Thanks for adding that.
There's a small issue left: a header line like
still reports an error that a pages entry is mandatory.
After editing the header line to
the import works.
Some additional requests:
- an option to write the Song List Format line to the top of the exported list would be nice (maybe a checkbox next to "Show Setlist Title")
- the "Generate Song List" menu entry would make sense not only for setlists, but also for collections and albums. I use one album per fakebook and have to create a corresponding setlist before I export it. When done, I delete that temporary setlist immediately.
- a final ; at the end of every line should not be required. Exporting a CSV from LibreOffice Calc adds the specified field separator between the fields, but not at the end of each line, so in MSP the last column is missing. There's a simple workaround: adding an unused column
I've found the problem with %PAGE_ORDER% not working, thanks for letting me know.

As for the ; at the end of every line, I really don't think that's necessary. As long as every column is separated by the proper delimiter, and each row of values has the proper number of columns, it should all work. I'll have to mess around with this a little more to see if can reproduce what you are seeing.

I'll certainly consider your requests, but I'm starting to think the "Generate Song List" feature is straying from it's original purpose. I had intended for it to be used for sharing lists of songs with other people just as a textual list. In that context, generating lists of songs for sharing purposes is mainly useful for setlists, but I guess I could also see it being useful occasionally for other types like collections. Putting the format at the top of the generated song list only makes sense for use with CSV files. I'm not sure it makes sense in any other scenario. I say this because, instead of blurring what the current feature is intended for, perhaps I should be adding something like a "Generate CSV File" option that could be tailored for use in this scenario. It would also eliminate the need to copy the song list into an existing CSV file (I'm not sure what your current process for this is). I'd like to hear some thoughts on this. I've been thinking that the right place for "Generate Song List" may be under the Share menu with a slightly different description (as I currently already have a "Share song list" option under there for .mss files). That or I could have a "Generate" top level option, with "Song List" and "CSV File" under there, which would create a nice container for future features involving generation of new content.

Sure, a dedicated "export CSV file" would be even better. Generating a textual list of songs for sharing imho would make sense not only for setlists: e.g. I use a collection for each of my bands, so generating a song list for such a collection would export a perfect overview of a band's repertoire. I have source types for songs in ChordPro format, songs that I added using the tablet's camera (needing to be reworked later), songs marked with "TODO" and so on, for any of those creating a list could make sense.
My workflow: when I tap "Generate Song List" a list of apps pops up to select where the song list should go to. I usually select "Jota", my favorite text editor. Out of Jota I can easily save the list wherever I want.
The ; at the end of the line is necessary (but shouldn'T): if it's not there, MSP does not import the last column.
Can you point me to a CSV that demonstrates this? I just used a CSV that had this as the first line:


And everything worked fine, even without the semi-colon at the end. Or am I misunderstanding you and you are saying that rows without a semi-colon at the end ignore the last value? This also doesn't seem to be the case as the first row in my file had no semi-colon at the end and it correctly read in the difficulty I specified. If there is a blank value at the end, this should be ignored anyways, so I don't think that's the problem you are describing either...

(06-15-2016, 08:24 AM)Zuberman Wrote: [ -> ]..., perhaps I should be adding something like a "Generate CSV File" option ...

Very interesting would be the possibility to import (merge?) such a CSV file, to update metadata for existing songs.
I believe that was requested when the CSV talks first began. It's definitely on my list of things to add when time allows. That and the ability to import multiple files through CSV instead of just one at a time.
Sorry for the confusion. I was mislead. It is neither the missing semicolon nor the last column that caused the problem. Its %SOURCE_TYPES% that doesn't import correctly. Replacing it to 'source types' (without the quotes) fixes it.
One more: if an unknown tag is found in the first line, MSP seems to skip it and move the following tags to the left. But it does not skip the according data column, so that the content of the columns to the right are imported into the wrong database fields.
See the example: %SOURCE_TYPES% did not work, that caused the content of the source type column to be imported into "Composers"
Is that with version 1.5.3? I thought I fixed the source_types issue in v1.5.3, as it was the same as the problem with page_order.

You are correct that I don't adjust the columns when importing if an invalid column is skipped. I'll have to look into fixing that.
Yes, it still happens with 1.5.3.
I just tested your files with v1.5.3 and it worked just fine for me. The fields were correctly put in the source types field.
Pages: 1 2