简体   繁体   中英

Python - Add a list in one single Excel cell separated per line

I need to add an Python list in one single excel cell separating the values by line.

I have tried some methods from Pandas and Openpyxl but nothing worked for me.

What I got

在此处输入图像描述

What I need

在此处输入图像描述

In excel you press Alt-enter to start a new line within a cell. I think the below question/answer will get you on the right track.

Pandas/Excel: Any way to encode the ALT-ENTER / CHAR(10) line break into data when calling DataFrame.to_excel()?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM