Hi Jose Luis,
To write a table to a text file with tabs as delimiters, you can use a Python script. Here's a simple example to demonstrate how you can achieve this:
# Define your table as a list of lists
table = [
["Name", "Age", "City"],
["Alice", "30", "New York"],
["Bob", "25", "Los Angeles"],
["Charlie", "35", "Chicago"]
]
# Open a file in write mode
with open('table.txt', 'w') as file:
# Iterate over each row in the table
for row in table:
# Join each cell in the row with a tab character and write to the file
file.write('\t'.join(row) + '\n')
print("Table written to 'table.txt' with tabs as delimiters.")
This script does the following:
1. Defines a sample table as a list of lists.
2. Opens a file named table.txt in write mode.
3. Iterates over each row in the table, joins the cells in the row with a tab character (\t), and writes the resulting string to the file followed by a newline character (\n).
You can adjust the table variable to match your actual data. After running this script, you should find your data neatly organized in table.txt, with each column separated by a tab.
If you need any further assistance, feel free to ask!
------------------------------
Jude Ighomena
Senior Manager, Core Network Operations
Broadbased Communications Limited
Lagos, Nigeria
+2348163474613
------------------------------
Original Message:
Sent: Fri May 24, 2024 06:01 AM
From: Milan Babčanec
Subject: Write table to file using tab as delimiter
I had to use "Save Office File As" plain text. In this case Office saves the Excel Table with a TAB delimiter.
------------------------------
Milan Babčanec
Original Message:
Sent: Fri April 14, 2023 12:28 PM
From: Jose Luis Rodriguez Gonzalez
Subject: Write table to file using tab as delimiter
Hello, everybody.
I need to use the command write a table to a txt file, this file needs to be separated by tabs. ¿How can I do that? I can't directly enter the tab in the parameter and I tried with scape characters like \t.
Thank you.
------------------------------
Jose Luis Rodriguez Gonzalez
------------------------------