Not using a module (not my decision). It's a tab-delimited file - i.e. open file handle and print tab-delimited strings to it. It "mainly" gets opened by Excel is all. If there was a way to print alt+enter equivalent or something for Excel it'd be great. The file can have some stuff for Excel in it (can be removed by text editor) but should be formatted in case of import in Excel. | [reply] |
You cannot put newlines, or tabs, in a cell, in tab delimited files. It comes with the territory.
You could upgrade to a CSV file (possibly even using a tab as the column delimiter), which allows you to quote cell contents and thereby including newlines.
You could also try to just use a standalone return ("\r") in the tab delimited file. No garantees, it could work, but it's an extremely dangerous hack — you never know if somebody editing the file in a text editor could ruin it for you.
| [reply] |