导入模块: Difference between revisions

Jump to navigation Jump to search
No edit summary
Tag: 2017 source edit
Line 17: Line 17:
userdoc=本页}}
userdoc=本页}}


=介绍=
=简介=
为了将现有/旧数据批量导入Dolibarr,有几种选择是可能的。本页描述首选方法,即使用内置的导入模块。
要将现有/遗留的数据批量导入Dolibarr,有几种可能的方法。本页介绍使用内置的导入模块的首选方法。
本页中描述了批量导入的其他解决方案[[批量导入]]。
 
其他解决方案在页面 [[批量导入]] 中介绍。
=安装=
=安装=
{{NoInstallModuleZh}}
{{NoInstallModuleZh}}
Line 26: Line 27:
{{ActivationModuleZh}}
{{ActivationModuleZh}}


参见 [[Setup Other]],修改导入/导出CSV文件的分隔符和字符集(字符集)。
另请参阅页面 [[Setup Other]] ,以修改导入/导出CSV文件的分隔符和字符集(charset)。


=用法=
=使用方法=
导入旧有数据可能需要对源文件进行多次尝试/修改以产生成功的导入。
导入遗留数据可能需要多次尝试/修改源文件才能成功导入。


建议使用LibreOffice/OpenOffice来“构建”单个源电子表格(.ods),并且对于每次修改/校正,重复地保存为CSV,因为字符集handling/csv结构定义对于多字节(搭接)文本字符串要远远优于Excel。
建议使用 LibreOffice/OpenOffice 来“构建”单个源电子表格(.ods),并在每次修改/更正后重复地另存为CSV,因为字符集 handling/csv 结构定义在多字节(acccented)文本字符串方面远优于Excel。


While most fields are logical in their content, address data for provinces (StateID) is not.
虽然大多数字段的内容都是合乎逻辑的,但省份的地址数据(StateID)则不然。此字段不能使用省的名称导入(在不同国家/地区之间可能不是唯一的,例如“Florida”),但必须与表 llx_c_departements 中的整数 rowid 匹配。file字段中的值应以“id:”为前缀,以确保强制导入检查与rowid匹配。要将省份与 rowid 匹配,一种方法是使用SQL编辑器将表导出为CSV,然后将其与电子表格 VLOOKUP 函数一起使用以返回 rowid。这仍然需要手动检查,因为在省份名称重复的情况下,VLOOKUP只会返回第一个匹配项。
This field cannot be imported using the name of the province (which may not be unique between countries, i.e."Florida") but must match the rowid integer in table llx_c_departements. The value in the file field should be prefixed with "id:" to ensure that the import check is forced to match the rowid.
To match your provinces to the rowid, one method would be to export the table as a CSV using a SQL editor, then use it with the spreadsheet VLOOKUP function to return the rowid. This will still require manual checking as VLOOKUP will only return the first match in the case of duplicate province names.


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.
您可能会发现,您的遗留数据中有一些国家/地区/省份尚未被添加到Dolibarr中。在导入遗留数据之前,可以使用安装文件中的 myqsl 查询作为示例添加新的地区/省份。


To import a file:
要导入文件,请执行以下操作:


*Go to the Tools menu - New import.
*Go to the Tools menu - New import.
714

edits

Navigation menu