Module Imports: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 23: Line 23:


= Usage =
= Usage =
Importing legacy data will likely require many attempts/modifications of the data in the source file to produce a successful import. it is recommended to use LibreOffice/OpenOffice to "build" a source spreadsheet (.ods) and save as a csv for each modification, as the character set handling/csv definition is far superior to Excel for multibyte (acccented) text strings.
Importing legacy data will likely require many attempts/modifications of the data in the source file to produce a successful import. It is recommended to use LibreOffice/OpenOffice to "build" a single source spreadsheet (.ods) and repeatedly Save As a CSV for each modification/correction, as the character set handling/csv structure definition is far superior to Excel for multibyte (acccented) text strings.
While most fields are logical in their contents, address data for provinces (StateID) is not. This field cannot imported as the name of the province (which may not be unique between countries, i.e."Florida") but needs to match a unique code already assigned to that province in the table llx_c_departements. These unique codes are not consistent between countries and while they may be looked up in the Admin-Setup-Dictionaries-State/Province, this is slow and cumbersome if you need to match provinces in different countries. One method would be to export this table as a CSV using a SQL editor, or open the installation file (htdocs/install/mysql/data/llx_20_c_departements.sql) with a text editor and search per province name.
While most fields are logical in their contents, address data for provinces (StateID) is not. This field cannot imported as the name of the province (which may not be unique between countries, i.e."Florida") but needs to match a unique code already assigned to that province in the table llx_c_departements. These unique codes are not consistent between countries and while they may be looked up in the Admin-Setup-Dictionaries-State/Province, this is slow and cumbersome for mapping to many provinces in different countries in the legacy data.
One method would be to export this table as a CSV using a SQL editor, to use as a reference or merge and use the VLOOKUP function, or open the installation file (htdocs/install/mysql/data/llx_20_c_departements.sql) with a text editor and search per province name.
You may find you have countries in your legacy data for which regions/provinces have not yet been added to Dolibarr. You can use the myqsl queries in the installation file as examples to add the new regions/provinces before you can import your legacy data.
 
To import a file:
To import a file:
* Go to the Tools menu - New import.
* Go to the Tools menu - New import.
98

edits

Navigation menu