This question has been flagged
1 Reply
6974 Views

If an excel file is saved in csv for importing, what encoding should we assume?

Is it dependent on:

  • Excel Version
  • Operating System
  • Excel Language
  • Special Characters used in the file

NB. There is no full proof way of determining the encoding of a given csv file. This is a limitation of the csv format. But, knowing enough of the source of the file may be enough to make a good enough guess.

Avatar
Discard
Best Answer

For any question about importing data into OpenERP, the following answer solves 90% of them: Just export data from OpenERP with the option "import compatible" and that gives you a template you can reuse to import. (If you need to import data from 1 csv file for more than 1 model, you will have to learn about the different ids that are in use in OpenERP like internal and external ids, etc...)

Moreover, it is incorrect to say that it is not possible to determine the encoding of a given csv file. A csv file is just a text file; if you open it with an advanced text editor (eg. Notepad++), you will see its encoding. So, you can do that on the exported csv you would get from OpenERP to see what is needed.

csv files are text files; the only thing they have to do with Excel versions or OS is the default parameters they might use for the encoding, but you can change it afterwards anyway with an editor like Notepad++ or any IDE. However you need to make sure of the encoding (ANSI, UTF-8,...), character set (ISO 8859-1 and all that good stuff), and possibly the format (Windows, Mac, Unix,...). In any way, OpenERP import's feature will alert you if something is wrong and help you troubleshoot where the problem is.

Avatar
Discard