Convert text files to excel files using python
Posted
by
Rahim Jaafar
on Stack Overflow
See other posts from Stack Overflow
or by Rahim Jaafar
Published on 2013-10-30T08:21:56Z
Indexed on
2013/11/09
3:56 UTC
Read the original article
Hit count: 490
xls
I am working on INFORMIX 4GL programs. That programs produce output text files.This is an example of the output:
Lot No|Purchaser name|Billing|Payment|Deposit|Balance|
J1006|JAUHARI BIN HAMIDI|5285.05|4923.25|0.00|361.80|
J1007|LEE, CHIA-JUI AKA LEE, ANDREW J. R.|5366.15|5313.70|0.00|52.45|
J1008|NAZRIN ANEEZA BINTI NAZARUDDIN|5669.55|5365.30|0.00|304.25|
J1009|YAZID LUTFI BIN AHMAD LUTFI|3180.05|3022.30|0.00|157.75|
This text files can manually convert to excel files.But, I wanna ask, is there any script that I can use to convert .txt files to .xls files ?
Hi all,now I'm already can convert text files to excell file by python using script that was given from user named Rami Helmy.A big thanks for him.But now,That script will produce more than one excell files depends on the number of '|' from the text files.Beside that,That script also can only convert one text files.I a going to convert all text files without state the name of text files.Therefore,I am looking such a way on how to this script going to:
- output only one excell file
- convert all .txt files from the directory that was given from user.
- output excell's file name are automaticly copied from the file name of text files.
I am new in python,hopefully someone can help me to solve my problems.Thank You..
done all the task,but there was something that I'm confused.. that output excell files contains an "square" symbol like this:
then, how can I ensure that there is no square symbol like that after I convert from text files to excell? thank you...
© Stack Overflow or respective owner