Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
277 Представления

✅ CSV Import Works

✅ Importing the same data using a .CSV file works without issue.


❌ XLSX Import Fails

When attempting to import the .XLSX version, the following errors occur:

In Odoo UI (Browser Console Error):
UncaughtClientError > SyntaxError

Uncaught Javascript Error > Failed to execute 'appendChild' on 'Node': Unexpected token '<'

SyntaxError: Failed to execute 'appendChild' on 'Node': Unexpected token '<'

    at DOMEval (web.assets_common.min.js)

    at jQuery.globalEval (...)

    ...

In Odoo Server Log (Backend Error):
ValueError: A string literal cannot contain NUL (0x00) characters.

Аватар
Отменить
Автор Лучший ответ

Hi,

Thank you for the detailed explanation.


I’ve followed your suggested steps, including re-saving the file using Microsoft Excel as an “Excel Workbook (*.xlsx)”, but the issue still persists.


To provide more context:

I’ve backed up both data and code from the main server and restored them to a local environment.

Using the same .xlsx file, the import works perfectly on the local server, but still fails on the main server with the same error.


I would truly appreciate any further suggestions or insights you may have.

Аватар
Отменить
Лучший ответ

Hi,

CSV works because it is plain text without special encoding, making it easily readable by Odoo.


XLSX files involve binary structure and XML, which are more prone to format-related issues.


XLSX files created in non-standard editors like LibreOffice or Google Sheets may include non-compliant elements.


Saving as .xls or .ods instead of .xlsx can lead to import errors in Odoo.


Odoo may misinterpret an invalid XLSX file as HTML, causing "Unexpected token '<'" errors in the browser.


Corrupted or improperly encoded XLSX files may contain null (\x00) characters, triggering Python backend errors.


Always open the file in Microsoft Excel to check if it opens without repair warnings.


Use “File > Save As” and select “Excel Workbook (*.xlsx)” format from Excel's save options.


Avoid saving as “Excel 97-2003 Workbook”, “CSV (Macintosh)”, or any other legacy/incompatible format.


After saving correctly, test import using Odoo's built-in Import feature to ensure the format is accepted.


Hope it helps.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
4
мар. 15
10277
0
июл. 24
1126
3
июн. 20
3754
1
нояб. 18
9298
11
февр. 17
63547