import pandas as pd
# Specify the path to your text file
file_path = 'path/to/your/file.txt'
# Define headers (replace 'Column1', 'Column2', etc., with your actual column names)
column_names = ['Column1', 'Column2', 'Column3', 'Column4']
# Read the data from the text file into a pandas DataFrame with specified headers
# delimeter is the term thats in betwwen your data in the txt
data = pd.read_csv(file_path, delimiter='\t', names=column_names)
# Display the loaded data
print(data)
# Write data to an Excel file
output_excel_path = 'path/to/output/file.xlsx'
data.to_excel(output_excel_path, index=False)