大佬们,怎么用 openpyxl 模块实现在同一个单元格内主动换行写入?

1 renmu Apr 3, 2020 via Android 字符串里加一个\n 试试? |
3 renmu Apr 3, 2020 via Android 我找到了这个,你可以试试,可以在 Stack Overflow 搜这个:Writing multi-line strings into cells using openpyxl 。 我发不出来链接。 worksheet.cell('A1').style.alignment.wrap_text = True worksheet.cell('A1').value = "Line 1\nLine 2\nLine 3" |