Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
978 views
in Technique[技术] by (71.8m points)

trying to use Python to read text files into Excel 2016 sheet

Trying to use Python but struggling. I have several text files with similar content:

System id: N-30 Measurement date: 17.01.17
Results file name: 71HJ1935.NMC Measurement option: MC Precision Data source: Shift register
Singles: 9493.060 Doubles: 770.560 Triples: 90.068 Scaler 1: 0.000 Scaler 2: 0.000

i want to do is read the files into one Excel spreadsheet that has headers and correspoding values under each header. Like so:

|System id|Measurement Date|Results File Name|Singles|Doubles| |N-30 | 17.01.17 | 71HJ1935.NMC | 9493.060| 770.560| |N-30 | 18.02.18 | 82HJ2345.NMC | 8546.456| 550.321|

I can create the headers in Excel i'm just struggling with read each files contents and sorting it into a Excel sheet. Any suggestions?

question from:https://stackoverflow.com/questions/66069001/trying-to-use-python-to-read-text-files-into-excel-2016-sheet

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...