Line 25:
Line 25:
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.
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 content, 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.
+
While most fields are logical in their content, address data for provinces (StateID) is not. This field cannot be imported using the name of the province (which may not be unique between countries, i.e."Florida") but must 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.
+
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 (which will still require manual checking as VLOOKUP will only return the first match), 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.
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.