Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
310 Переглядів

✅ 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
10299
0
лип. 24
1154
3
черв. 20
3804
1
лист. 18
9312
11
лют. 17
63602