• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

RealmWorks CSV Import Tool

In a CSV, the "...." is only required around the items which have embedded commas. For simple columns it shouldn't be required.
commas, new lines and quotes actually. You need to embed all of them in quotes actually.

In a CSV file commas mark the end of a column and the new line symbol marks the end of the row. Therefore to include either one in your data you need to wrap it in quotes. Since quotes themselves are treated as a special symbol if you need to include a quotation mark you need to wrap it in quotes as well.

This is why I wrote above that for all but the most trivial CSV files it is far easier to build the file in Excel or some other spreadsheet program and then export it as a CSV rather than trying to build it by hand.
 
Thanks a lot! I was aware of the quotes, but I put them around each delimiter and not around the whole text block, which makes it obviously easier. :-)
 
Comma Separated Values.

It's a type of file format where each column of data is separated from the next by a comma, and each row ending with a newline character.

It's a pretty universal way of sending tabular data from one place to another. Almost every data source will have a way to read CSV files.
 
I'm importing my first CSV file into this program as I type. Its a list of all the magic spells in 5e. I'm sure I'm going to have to figure some things out with it being overly aggressive on links (curse you 'light' spell!) but I'll figure those out as I go.

This might be outside the scope of what this tool does, but it would be a nice feature to be able to export existing articles, do mass clean ups in excel, then reimport to update in bulk.

Thanks for putting time into this, its an excellent tool!
 
Last edited:
Also, got this error importing my CSV file:

The following errors were encountered during import:

Encountered validation error for the import XML: The 'public_name' attribute is invalid - The value '' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:top_level_name_type' - The actual length is less than the MinLength value.

Invalid name specified

I looked over my CSV and I don't think any of the name fields are empty. Any idea what could be going on?
 
I looked over my CSV and I don't think any of the name fields are empty. Any idea what could be going on?

Do you have a field which is a single quote character?
Perhaps something like
... , \" , ...

Just in case the error message is misleading, the maximum length of the "public_name" is limited to 100 characters.
 
Hi, I've been getting this specific problem, with a few imports. Can someone please help me with this?
Thanks in advance

The following errors were encountered during import:

Encountered validation error for the import XML: The 'public_name' attribute is invalid - The value '' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:top_level_name_type' - The actual length is less than the MinLength value.

Invalid name specified
 
Hi, I've been getting this specific problem, with a few imports. Can someone please help me with this?
Thanks in advance

The following errors were encountered during import:

Encountered validation error for the import XML: The 'public_name' attribute is invalid - The value '' is invalid according to its datatype 'urn:lonewolfdevel.com:realm-works-export:top_level_name_type' - The actual length is less than the MinLength value.

Invalid name specified

Hi, can you PM me links to the original CSV and the resulting XML file?
I will have a look to see what is going on.
 
I've had a quick look at the files, and the RWEXPORT file has a blank topic as the very first topic. I suspect this is being created from the blank line that appears in the CSV file (the very last line of the file).

It looks like the CSV import code I'm using treats a blank line as if it was a valid CSV record, so it creates a topic with no data whatsoever.

I will add this as a feature improvement for the next version, to check that the public_name (i.e. the topic title) is not empty.
 
If the problem is what Farling described, delete any blank lines in the CSV file and (if present) the line ending at the end of the file and try it again.

Farling, it might be better if you checked for blank (post-trimming) lines in your file reading code and errored or ignored them then (or treated them as the end of the file). That'd separate a blank line from a line with empty data ("", "", "", ...) if you care.
 
Last edited:
Where exactly is this last line? It's still happening

A new version of the tool (v1.7) is now available which addresses this specific issue.

Blank lines in CSV files are now ignored during input, so the table of data at the bottom of the screen won't show any blank lines and, more importantly, no empty topics will be written into the RWEXPORT file.

Please try the latest version to see if it gets you past this little hurdle :-)
 
Last edited:
Sorry but it's still happening with my imports

The CSV file which you sent to me actually seems to work fine. It doesn't produce the blank topic that it seen in the RWEXPORT file that you sent me.

I tried putting a blank line into your CSV immediately after the header row, and that created a bad RWEXPORT file which looked very similar to your RWEXPORT file.
 
Thanks for the additional files. I have now tracked down the problem. It is linked to the realm structure having the Herb category as a child category of the General Equipment Article.

When the General Equipment Article is used as the parent topic for your import, my tool is erroneously creating a blank (unnamed) Herb article as the first child of that topic!
 
Back
Top