Hey guys,
I found a few threads concerning this topic, but they all are a bit older. So I am wondering if there are functionalities allready added to this topic, that I do not create these twice. My requirement: Import: I get CSV files from my supplier's including all products, prices etc. Now I want to bring these products into the ofbiz system, prefered automated (with a service which runs every night). Export: I need to export product information into csv files to provide these to several search engine provider just as shopping.com, nextag etc. These files have to include the Url, product name and description, price, stock level etc. How do you handle these tasks? Cause I believe these ones almost every trading company has to fullfill. Kindly Robert |
Hi Robert,
There is a service named importAddressMatchMapCsv in PartyServices.java, which can be referred for customization in order to import data into OFBiz database in CSV format. You can also import data from Excel spreadsheet using service productImportFromSpreadsheet in ImportProductService.java. Thanks : Harsha Chadhar From: "Robert G." <[hidden email]> To: [hidden email] Date: 26-03-2013 21:57 Subject: Import Export CSV Files for products Hey guys, I found a few threads concerning this topic, but they all are a bit older. So I am wondering if there are functionalities allready added to this topic, that I do not create these twice. * My requirement:* /Import:/ I get CSV files from my supplier's including all products, prices etc. Now I want to bring these products into the ofbiz system, prefered automated (with a service which runs every night). /Export:/ I need to export product information into csv files to provide these to several search engine provider just as shopping.com, nextag etc. These files have to include the Url, product name and description, price, stock level etc. How do you handle these tasks? Cause I believe these ones almost every trading company has to fullfill. Kindly Robert -- View this message in context: http://ofbiz.135035.n4.nabble.com/Import-Export-CSV-Files-for-products-tp4640128.html Sent from the OFBiz - User mailing list archive at Nabble.com. =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you |
Robert,
Please take a look at ImportProductServices.productImportFromSpreadsheet It will give you general idea how you can achieve this. For overall functionality to address your requirement you will need to add custom code to do so. How can you do this, example exists in OFBiz and for addressing your requirement you will need customization. Code sample uses the apache.poi.poifs and apache.poi.hssf package to do so. Hope it helps! -- Rishi Solanki Manager, Enterprise Software Development HotWax Media Pvt. Ltd. Direct: +91-9893287847 http://www.hotwaxmedia.com On Thu, Mar 28, 2013 at 12:03 PM, Harsha Chadhar <[hidden email]>wrote: > Hi Robert, > There is a service named importAddressMatchMapCsv in > PartyServices.java, which can be referred for customization in order to > import data into OFBiz database in CSV format. You can also import data > from Excel spreadsheet using service productImportFromSpreadsheet in > ImportProductService.java. > > > Thanks : > Harsha Chadhar > > > > > From: > "Robert G." <[hidden email]> > To: > [hidden email] > Date: > 26-03-2013 21:57 > Subject: > Import Export CSV Files for products > > > > Hey guys, > > I found a few threads concerning this topic, but they all are a bit older. > So I am wondering if there are functionalities allready added to this > topic, > that I do not create these twice. > * > My requirement:* > /Import:/ > I get CSV files from my supplier's including all products, prices etc. Now > I > want to bring these products into the ofbiz system, prefered automated > (with > a service which runs every night). > > /Export:/ > I need to export product information into csv files to provide these to > several search engine provider just as shopping.com, nextag etc. These > files > have to include the Url, product name and description, price, stock level > etc. > > How do you handle these tasks? Cause I believe these ones almost every > trading company has to fullfill. > > Kindly > > Robert > > > > -- > View this message in context: > > http://ofbiz.135035.n4.nabble.com/Import-Export-CSV-Files-for-products-tp4640128.html > > Sent from the OFBiz - User mailing list archive at Nabble.com. > > > =====-----=====-----===== > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > |
hey, I started to use the data files tool to create an entity xml file from csv for an easy import.
now I am wondering if I can use multiple record entries in one definition file...because when I do that, it ignore's all besides the first record. Also I need to define the column in the csv for the field. I tried "position="1"" i.ex., but this is also ignored. The reason for my question is, that normally I have to put things in multiple entities, but all information are settled down in one csv file. So I want to avoid to click 5 times import with the tool and also to avoid to split my csv file in 5 files. any ideas? example: <?xml version="1.0" encoding="UTF-8" ?> <data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/datafiles.xsd"> <data-file name="partyManufacturers" separator-style="delimited" type-code="text" delimiter=","> <record name="Party" limit="many"> <field name="partyId" type="String" position="0"/> <field name="partyTypeId" type="String" position="1"/> <field name="statusId" type="String" position="2"/> </record> the following entry is completely ignored, also the position entries are ignored for all records <record name="PartyGroup" limit="many"> <field name="partyId" type="String" position="0"/> <field name="groupName" type="String" position="3"/> <field name="logoImageUrl" type="String" position="4"/> </record> </data-file> </data-files> |
Hi Robert, Ideally it should work! Did you tried to debug it? Check values of record in ModelDataFileReader.java at line#95.
-- Thanks And Regards Sumit Pandit Tata Consultancy Services Cell:- 917503046188 ____________________________________________ ----- Original Message ----- | From: "Robert G." <[hidden email]> | To: [hidden email] | Sent: Saturday, March 30, 2013 12:01:23 AM | Subject: Re: Import Export CSV Files for products | hey, I started to use the data files tool to create an entity xml | file from | csv for an easy import. | now I am wondering if I can use multiple record entries in one | definition | file...because when I do that, it ignore's all besides the first | record. | Also I need to define the column in the csv for the field. I tried | "position="1"" i.ex., but this is also ignored. | The reason for my question is, that normally I have to put things in | multiple entities, but all information are settled down in one csv | file. So | I want to avoid to click 5 times import with the tool and also to | avoid to | split my csv file in 5 files. | any ideas? | *example:* | /<?xml version="1.0" encoding="UTF-8" ?> | <data-files xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/datafiles.xsd"> | <data-file name="partyManufacturers" separator-style="delimited" | type-code="text" | delimiter=","> | <record name="Party" limit="many"> | <field name="partyId" type="String" position="0"/> | <field name="partyTypeId" type="String" position="1"/> | <field name="statusId" type="String" position="2"/> | </record> | *the following entry is completely ignored, also the position entries | are | ignored for all records* | <record name="PartyGroup" limit="many"> | <field name="partyId" type="String" position="0"/> | <field name="groupName" type="String" position="3"/> | <field name="logoImageUrl" type="String" position="4"/> | </record> | </data-file> | </data-files>/ | -- | View this message in context: | http://ofbiz.135035.n4.nabble.com/Import-Export-CSV-Files-for-products-tp4640128p4640236.html | Sent from the OFBiz - User mailing list archive at Nabble.com. =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you |
hey, thank you for the good hint. You are right within this file on that position it detects the multiple records, there it works.
But the output at the end to the xml file is just the one for one record. So I checked the other files like the DataFile.java, DataFile2EntityXml etc. but here there allready arrives just one records, so somewhere between thise classes seems to has an error, a wrong for clause or sth else. But actually I cannot really find the error. Maybe some has found it allreadY? Thanks |
ok, it does not seem to work:
ref: http://ofbiz.135035.n4.nabble.com/Multiple-records-with-Data-Files-Tool-td165526.html#a165528 |
Free forum by Nabble | Edit this page |