Odoo Help

1

0
2 Answers
0
Avatar

Mitul Shingala

--Mitul Shingala--
--Mitul Shingala--

Odoo Developer

Mitul Shingala
09-10-18 03:40

Hello,

using below code you can achieve your goal.

import csv
with open("filepath/file.csv", "rb") as f:
    reader = csv.reader(f, delimiter="\t")
    for i, line in enumerate(reader):
        print 'line[{}] = {}'.format(i, line)  # here you can get result line by line into the list, comma separate value into the quote.

1 Opmerking
twanda AG, Ermin Trevisan
09-10-18 04:01

Thanks for your answer, but I'm afraid I can not follow you. I simply want to import product attribute values containing commas.

0
Avatar

ayman mohammed adam

--ayman mohammed adam--
--ayman mohammed adam--


ayman mohammed adam
09-10-18 03:33

Dear  Ermin Trevisan

Try to import by using Excel File instead of CSV file.


I hope I helped you ...


1 Opmerking
twanda AG, Ermin Trevisan
09-10-18 03:57

Thanks for your answer. I did try it in several ways, none of them did work: as .xls and .xlsx files, without quotation marks, with single quotation marks, with double quotation marks. How does your Excel file looks like?

Stel een vraag
Writer
Keep Informed
1 volger(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now