I have a DataFrame that contains an A/C number column, where some values are longer than 15 digits. When I export the DataFrame to Excel using .to_excel(), Excel automatically converts these long numbers into scientific notation or rounds them off (e.g., showing 000 after 15 digits). How can I export this column as text, so the full account numbers are preserved in Excel?

categorydtype with pandas before exporting to Excel. Another option would be concatenating a single quote to value before exporting. As example, value1234would be'1234. The'in Excel forces the program to read it as text.