Posted by
michal-2 on
Nov 18, 2005; 2:31pm
URL: http://ofbiz.116.s1.nabble.com/OFBiz-Users-XLS-to-XML-tp136405p136411.html
Everything went fine. The product I was importing got into ofbiz.
I have another issue, which i kind of solved but maybe there is easier
solution to it.
Lets say I have three fields with this data:
(this data is not in ofbiz, I have it in xls)
productID,internalName,longDescription
1 pipe 3"
2 pipe 5"
Now when I save this in excel as tab, comma delimited values it looks like
that:
1,pipe,"3""
2,pipe,"3""
So then when I use data file tool in ofbiz I end up with double quotes for
values that are in "( "3"") in entity.xml file.
Is there a way to define text qualifier? How do you go around this issue?
My approach which isn't that good( I think there is better way haha)is:
I wrote script in perl that takes file with delimited values and process it;
changing commas to ! and getting rid of " around text.
Mike
----- Original Message -----
From: "Jacopo Cappellato" <
[hidden email]>
To: "OFBiz Users / Usage Discussion" <
[hidden email]>
Sent: Friday, November 18, 2005 1:13 AM
Subject: Re: [OFBiz] Users - XLS to XML
> Are you sure that the product has not been imported?
> The message:
>
> "Got 1 entities to write to the datasource"
>
> is a "success" response.
>
> Could you send the generated xml file?
> Please, use the Webtools--> Entity SQL processor to search for the product
> you have imported:
>
> select * from PRODUCT where PRODUCT_ID = 'theProductId'
>
>
> Jacopo
>
> michal wrote:
>> Thanks your instructions were very helpful. I have one more question
>> about importing:
>> After I created xml file, I went to XML Data Import entered the file name
>> clicked Import and then I got on the bottom of the page message saying
>> "Got 1 entities to write to the datasource". I was importing products and
>> when I search for these products they are not in ofbiz. What other steps
>> I have to do to import data ?
>> Michal
>> ----- Original Message ----- From: "Jacopo Cappellato" <
[hidden email]>
>> To: "OFBiz Users / Usage Discussion" <
[hidden email]>
>> Sent: Friday, November 11, 2005 12:03 PM
>> Subject: Re: [OFBiz] Users - XLS to XML
>>
>>
>>> Hi michal,
>>>
>>> yes the paths are absolute paths of the server.
>>> These are the fields you should fill:
>>>
>>> Data Filename or URL: --> the path to the csv file
>>> Definition Filename or URL: --> the path to the def file
>>> Data File Definition Name: --> the name of the definition in the def
>>> file
>>> Save to entity xml file: --> the path to the xml file you want to create
>>>
>>> For example see the attached definition file.
>>> It can be used to parse a csv file in the format:
>>>
>>> productId#internalName#productName#description#longDescription
>>>
>>> Let's say the csv file is in: \tmp\data.csv
>>> and the above def file on: \tmp\product_descriptions.xml
>>> and that you want to create an entity xml file called: \tmp\dataxml.xml
>>>
>>> You have to set:
>>>
>>> Data Filename or URL: --> \tmp\data.csv
>>> Definition Filename or URL: --> \tmp\product_descriptions.xml
>>> Data File Definition Name: --> "descriptions"
>>> Save to entity xml file: --> \tmp\dataxml.xml
>>>
>>> The \tmp\dataxml.xml will be created, then you can easily import it into
>>> OFBiz.
>>>
>>> Hope this helps.
>>>
>>> Jacopo
>>>
>
> _______________________________________________
> Users mailing list
>
[hidden email]
>
http://lists.ofbiz.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users