Controlling CSV/TAB Headers

Because of its age, FileMaker has a variety of options sprinkled in a bunch of different places regarding exporting data. Some of these options relate to getting the exact export of data you need from the software.

In this video I cover a variety of specifics related to exporting data. One feature in particular is controlling the export headers you may need on your custom export. If you've ever needed to provide an output file of either CSV or TAB, and you'd like to have full control over the headers, then look no further.

You'll find all the details about formatting for custom output, injecting your own desired headers and how to deal with the output on mobile FileMaker Go vs. the Desktop client. Need customized exports? Watch this video and learn from the provided file.

AttachmentSize
ControllingCSV:TABHeaders.zip1.65 MB
Tags:
CSV

Comments

This couldn't have come at a better time! But I do need as Excel.
I changed line 3 to $filename "Custom Export Filename.xlsx".
And line 10 to ".xlsx".

When I try to open the new .xlsx file I get "Excel cannot open the file 'Custom Export Filename.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."

What am I missing?

Thanks,

Tim

Hi Tim, unfortunately an Excel file is a specific format (pretty much XML). It's not raw text like CSV or TAB. This means you would either have to use FileMaker's export option as an Excel Workbook or you'd need to use a plugin like the MBS plugin to output an Excel document which you could manipulate.

Modifying FileMaker's default Excel output is going to be a bit more complicated than what is shown in this video. However, Excel can easily open a CSV/Tab file. If you need the ultimate in Excel modifications you'll need to use either a plugin or an external technology which offers freely available libraries.

I hope that helps out.

-- Matt Petrowsky - ISO FileMaker Magazine Editor

Thanks for this very practical and helpful video, Matt. One of my favorites and I have been a subscriber since the beginning.

Get an error message when trying to open the zip file. It says the file name "Controlling CSV:TAB Headers.fmp12" is invalid. In Windows you can't have a colon ":" in the file name. I notice that the Zip file name has been fixed CSV_TAB.

Thanks Matt,
I put the human-readable names of my fields into the field comment box. Is there a way to use the FieldComment function to derive the column header?

Also, is there a way to allow users to browse a field path for export at any time they choose and store that in a field in the database so that future exports just use that path? This would need to work for clients on a FMS.

Thanks again.

Roger