You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by viswanath <vi...@gmail.com> on 2011/12/08 08:28:42 UTC

Data files in ofbiz

Hi All,

 Can any one help me  in importing csv files into ofbiz database as same
like xml import in ofbiz-10.04
it there any way to import csv directly into database or the csv should
convert into xml, also help me hw to use work with data files in ofbiz







Thanks in advance

--
View this message in context: http://ofbiz.135035.n4.nabble.com/Data-files-in-ofbiz-tp4171814p4171814.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Data files in ofbiz

Posted by viswanath <vi...@gmail.com>.
Hi All,

     Finally i got the solution for importing csv data's into ofbiz
datasource
having your csv file in ur local disk, and write a xml file as a template
for the table along with field names
like

<data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/datafiles.xsd">
    <data-file name="posreport" separator-style="fixed-length"
type-code="text">
        <record name="tillentry" limit="many">
            <field name="tillCode" type="String" length="16" position="0"/>
            <field name="name" type="String" length="32" position="17"/>
            <field name="prodCode" type="String" length="12" position="63"/>
            <field name="quantity" type="String" length="8" position="76"/>
            <field name="totalPrice" type="String" length="8"
position="85"/>
        </record>
    </data-file>
</data-files>

then mention the path of these file in working with data file in ofbiz, it
will give you a xml file like
<entity-engine-xml>
<tillentry tillCode="021196033702" name="5031BB GLITTER GLUE PENS BRIGH"
prodCode="5031BB" quantity="1" totalPrice="299" />
<tillentry tillCode="021196043121" name="BB4312 WONDERFOAM ASSORTED"
prodCode="BB4312" quantity="1" totalPrice="280" />
<tillentry tillCode="021196055025" name="9905BB  PLUMAGE MULTICOLOURED"
prodCode="9905BB" quantity="4" totalPrice="396" />
</entity-engine-xml>

then import this as usuall in the xml data import tab




--
View this message in context: http://ofbiz.135035.n4.nabble.com/Data-files-in-ofbiz-tp4171814p4172399.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: Data files in ofbiz

Posted by Sumit Pandit <me...@gmail.com>.
Hi Refer service importAddressMatchMapCsv, it should help.


On Thu, Dec 8, 2011 at 12:58 PM, viswanath <vi...@gmail.com> wrote:

> Hi All,
>
>  Can any one help me  in importing csv files into ofbiz database as same
> like xml import in ofbiz-10.04
> it there any way to import csv directly into database or the csv should
> convert into xml, also help me hw to use work with data files in ofbiz
>
>
>
>
>
>
>
> Thanks in advance
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/Data-files-in-ofbiz-tp4171814p4171814.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>



-- 
Thanks and Regards
Sumit Pandit

Re: Data files in ofbiz

Posted by BJ Freeman <bj...@free-man.net>.
there are threads both on dev and user mailing list
https://cwiki.apache.org/confluence/display/OFBENDUSER/OFBiz%27s+Data+File+Tools

viswanath sent the following on 12/7/2011 11:28 PM:
> Hi All,
> 
>  Can any one help me  in importing csv files into ofbiz database as same
> like xml import in ofbiz-10.04
> it there any way to import csv directly into database or the csv should
> convert into xml, also help me hw to use work with data files in ofbiz
> 
> 
> 
> 
> 
> 
> 
> Thanks in advance
> 
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Data-files-in-ofbiz-tp4171814p4171814.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>