Developer forum

Forum » Development » csv to xml

Reply

I have some pipes settup in import/export that uses the csv to xml activity. I have a xslt file that formates the xml.

 

my problem is that if I have these two rows in my csv file:

 

abc;1

123;2

 

"abc" is not imported to the xml file only "123"

 

if I have these two lines :

 

abc;1

def;2

 

both "abc" and "def" is imported.

 

Could it be something wrong whit my xslt file?

it looks like as soon as there is a number in one field, that field has to be a number in all rows.

 

 


Replies

 
Reply

Try adding an empty line at the beginning of your CSV file.

 
Reply
Sorensen wrote:

Try adding an empty line at the beginning of your CSV file.


I tryed and I still get the same results

 
Reply

Then... What if you add an empty line at the end of the file?

 
Reply
Sorensen wrote:

Then... What if you add an empty line at the end of the file?


No, didn't work.

I eaven tryed one in the beggining and one in the end and that didn't work.

 

It looks like that hole column is tranfrormed to integer values if there is a integer value on one row.

 

 
Reply

That's a classic issue, at least when importing xsl files. When the process encounters a different datatype than what it expects, it will just stop processing. Make sure that all columns in the first row are string values.    

 
Reply
Sorensen wrote:

That's a classic issue, at least when importing xsl files. When the process encounters a different datatype than what it expects, it will just stop processing. Make sure that all columns in the first row are string values.    

Just looked in the databese and it has worked before but if I run it again it doesn't.
I found both numeric and alfanumeric values on different rows.

These values where imported some weeks ago.

So if I import them again using the same files and the same pipe it sould work. But it doesn't.

Why doesn't it work now?

 

 

 
Reply

Could you send the files to me? I'd like to test with them in a different invironment.

 
Reply
Sorensen wrote:

Could you send the files to me? I'd like to test with them in a different invironment.


I have sendt you the test files if there is anything else you whant please let me know.

 

You must be logged in to post in the forum