Export/Import Issues

I was trying to go a clean reset of STRIP due to some apparent database issues. I exported the data using the Export option under STRIP 2.5.3 OSX and then removed STRIP completely and reinstalled then tried to Import.

It turns out thought that the CSV file created by the Export option can’t be re-imported into STRIP. The file has an additional column called “Entry ID” that causes STRIP to throw an error and abort the Import. Removal of this column enabled me to import with issue.

Unfortunately I forgot to write down the exact error code.

Is this intended behaviour or a bug of some kind? If intended maybe we could get a prompt when exporting giving the option to included and miss out the extra column, assuming it has an purpose in some situations.

@JamesKrawczyk Hi James, this isn’t a bug, but it isn’t ideal behavior either. I’d like to revisit these features soon. Here’s what’s happening:

STRIP’s Export feature includes an EntryID column, as you observed, which is the unique identifier of the entry in the database. If you were to modify this file with a spreadsheet editor and then feed it back into STRIP’s Import feature, STRIP will try to match each row with an EntryID to an existing entry in the database and update it with the data from that row.

Deleting the EntryID column from a STRIP Export makes the file suitable for import to an empty database. The reason you ran into an error was because for rows that had an EntryID value, that value didn’t correspond to any entry in the app’s database, because it had been reset.

The kind of bulk update served by the EntryID column isn’t generally a good idea. We’ll consider removing it or making the feature more forgiving—for example, giving you the option to exclude it as you suggested.

I’m encountering a similar issue. I used the STRIP export tool to generate a CSV on one Mac, and I’m attempting to import the same file on another Mac. The error I receive when doing so is:

“Format error reading import data: File is missing a ‘Category’ column”

Also, it’s not clear to me which column is the “EntryID” column referenced above as none of the columns in my export have a header row.

@wgray - can you clarify exactly what columns and ordering is required to successfully complete a CSV import?

Hi @mhammonds, certainly, sorry for the trouble. We have a detailed explanation of how it works here. In short, the spreadsheet must have two primary columns, named Entry and Category. The Entry column is the name of the record each row represents, the Category column is the name of the category the record should be put in.

Thus, a CSV could look something like this:

Entry,Category,Username,Password,Email,AnotherField,SomeOtherField
My Blog,Websites,mhammer,p4$$w0rd,m@example.com,,stuff

Entry and Category must not be blank for each row. The other columns are treated as fields, and they may be left blank. Properly escaped data and multi-line text are supported.

In your case I’m not sure what happened. Did you open the file up in a spreadsheet editor, and possibly save it to another format? Many spreadsheet programs will attempt to reformat CSV to their own custom storage format (and some like Microsoft Excel do not properly handle CSV data). If you open up that exported file in a plain text editor, does it look like CSV data, or is it in some other format like XML?

I think the thing to do here is to get a fresh export from your first Mac, and open the freshly exported CSV file in a plain text editor (Text Edit is fine) to see if there’s a header row like in my example above, and if the other rows with your data appear to be there.

If that looks good, let’s try another spreadsheet editor on the export file. Calc, part of the OpenOffice.org suite, is available for free and does handle CSV data correctly if you’d like to give that a shot. Open the file in Calc (I think you may need to specify that the delimiter is comma, not semi-colon), delete the EntryID column, and save the file. That should make it possible for you to import in STRIP on your second Mac.

Clearly this is too many hoops to jump through. We’ll get on adjusting export so the file does not need to be edited for import.

@mhammonds Another means of moving your data over would be to copy the file at ~/Library/Containers/net.zetetic.Strip.mac/Data/Library/Application Support/Strip/default.strip to that location on your second Mac. However, doing so would overwrite the data in STRIP on your second Mac rather than import the data from your first Mac to merge it into data on your second Mac, so I don’t recommend that if it’s not your intent.