APK errors

Excel opens the CSV as one column

If Excel shows the whole row in one cell, the letter is not broken. The separator does not match. An Azerbaijani setup treats the comma as a decimal mark, so the column separator is usually a semicolon. Excel does not treat a comma in the file as a separator.

This is not the letter ə breaking. If the letter is also broken, the file needs both utf-8-sig and ;.

Do not change everything at once. Check the cause in order.

  • In a blank Excel cell type =1,5. If it becomes a number, your separator is ;. If =1.5 becomes a number, your separator is a comma.
  • In Python the line should be csv.writer(fayl, delimiter=";"). Open the file with utf-8-sig and newline="".
  • Do not turn every comma into ; before you check the separator. A comma inside a number is the decimal mark, not a column.
  • Do not split the old file inside Excel. Write the file again from code.
  • If another program wants commas, the ; you wrote for Excel becomes one column there. If you need two files, do not mix the separators.

If the letter is ?, do not change the separator. That is the utf-8-sig page.

import csv

with open("metn.csv", "w", newline="", encoding="utf-8-sig") as fayl:
    csv.writer(fayl, delimiter=";").writerows([
        ["ad", "qiymet"],
        ["Azərbaycan", "1,50"],
    ])

Related guides