Jalz Posted July 10, 2007 Posted July 10, 2007 Hi Guys, Ive got a table of data which I want to export into a CSV file. When I do the export, filemaker places "" around each of the field values. Is there a simple way of preventing this behaviour? Many Thanks Jalz
Kiwi Posted July 10, 2007 Posted July 10, 2007 Without the "" any data that contains a comma will confuse the data. If you really need to remove the "", export as a TAB file and use a script (VBS or apple) to replace the TABs with commas.
Fenton Posted July 10, 2007 Posted July 10, 2007 (edited) I can think of another couple of methods. If you know any XSL you could build an xsl stylesheet to export with only commas (easy), or put quotes around text values, but none around number values. Or you could create an unstored calculation field, which contained all your export fields, putting comma's and quotes (escaped) where needed. Then export as Tabbed Text, only 1 field. XSL for no quotes, Unix line ending: Plain.xsl.zip Edited July 10, 2007 by Guest
Jalz Posted July 18, 2007 Author Posted July 18, 2007 Thankyou very much Fenton, This stylesheet removes the quotes. I notice you say unix line ending, can I do this in the export to prevent the deletion of carriage returns that seperate the records.
Fenton Posted July 18, 2007 Posted July 18, 2007 (edited) Well, it is putting the Unix line feed, ASCII 10, after each record. You could put anything you want there. But what? You'd want something to separate the records wouldn't you? CSV files have returns (of some type) between records. If you want Windows line endings, just add ASCII 13 before the ASCII 10. It's darn hard to show you here, as the PHP parser really tries hard to turn them into returns. (You have to Preview it at least once, and keep pasting in the code -) Windows line ending: Edited July 18, 2007 by Guest
Recommended Posts
This topic is 6337 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now