How to convert text file data into Excel file?

31 views
Skip to first unread message

Prashanth Patelc

unread,
Dec 29, 2022, 12:22:54 PM12/29/22
to django...@googlegroups.com
Hi all,

How to conver below text file data into xl file using pandas or python script?

Host address all related values host address decimal and also remaining all ..
Show in Excel data header below related values.

Text file data :
-----------------------

Host address - 123457

Host address (decimal) - 1111111

Host address (hex) - 111111

Network adr - 88888

Xl Output :
-----------------
Host address Host address 
123457 1111111
(decimal) remaining,,,,,

Ryan Nowakowski

unread,
Dec 29, 2022, 8:48:03 PM12/29/22
to django...@googlegroups.com
Not exactly right for a Django mailing list but I'll give it a shot 😉 I'd use the re (regular expression) module to parse the text file then use the csv module to output for Excel.
Reply all
Reply to author
Forward
0 new messages