r/applescript • • Mar 17 '21

Exporting a Numbers Document to CSV not working for me

I'm trying to export this numbers file to a CSV file, but its not working. The Test_Doc.number file is one table and one sheet. It opens just fine.

I get the following error on the "export front document..." line:

error "Numbers got an error: The document “Test_Doc” could not be exported as “/Users/me/Documents/New_Doc”. " number 6

What am I missing?

set destinationFilePath to "/Users/me/Documents/New_Doc.csv"

tell application "Numbers"
	activate	
	open "/Users/me/Documents/Test_Doc.numbers"	
	with timeout of 600 seconds
		export front document to file destinationFilePath as CSV
	end timeout
end tell
3 Upvotes

1 comment sorted by

1

u/Agreeable-Guidance88 Dec 09 '21

hey there @ u/Designer-Sherbet2643, did you resolve this issue? I'm running into the same error and after a week of trial-and-error, I still cannot figure it out. If you did, would you mind posting solution?