Sunday, May 24, 2026

macos – Copy/Paste tab or comma-separated columns to Numbers in separated cells

I’m attempting to repeat/paste the output of my terminal from VS Code into three columns (datetime, latitude, longitude) in a .numbers desk. Mainly, I am working a script that offers me datetime, lat, lon in my Terminal.

Whereas Excel has had not hassle placing the output in three separate cells, Numbers does not appear to be recognizing tab nor comma-separated values as column separators. I do know I may resolve this by making a .csv file as a substitute, after which importing it into Numbers, however that is unpractical for my context.

Am I lacking one thing? Is that this simply not one thing that is possible with Numbers?

I’ve tried manually copy-pasting the output from the Terminal, and automating the ‘copy’ through pbcopy, however none have labored. I find yourself with the whole lot in a single cell. Screenshot of a .numbers table with three columns with headers and a row with a single cell containing datetime hh:mm:ss.00 latitude longitude in a single row, not aligned with the columns.

This is a snippet of the code.

current_time = datetime.now(UTC)
datetime_with_ms = current_time.strftime('%Y-%m-%d %H:%M:%S.%f')[:-3] 
                    
lat = msg.latitude
lon = msg.longitude

#To manually copy-paste
print(f"{datetime_with_ms}t{lat}t{lon}")


#automated copy into clipboard
output_line = f"{datetime_with_ms}t{lat}t{lon}"
subprocess.run("pbcopy", textual content=True, enter=output_line)

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles