I don't understand what you're saying. AFAIK, if a field contains 0, it will export as:
… ,"0", …
and if it contains 0 = male, it wil be exported as:
… ,"0 = male", …
in CSV and Merge formats alike.
I believe you are putting text "0 = male" into a number field. That's usually not a good idea and can lead to a number of problems.
Let's call the above field "Gender". Define the above field as text and then add a new calculation field, GenderCode, set to return number that only stores the number.
You might write this as getasnumber (Gender) or just Gender
Either way strips out the text.
Export this field in your merge text export.
A number field containing text will export the full text content - both in CVS and Merge formats.
Which is why I recommended using a calculation field set to return type number for the export. That strips out the text.
If - as the OP says - it exports correctly in CSV format, then stripping out the text cannot be the solution.
I'm sorry let me be more clear - the field is stored as a number field, and then I have used a drop-down menu for that field that has the options "0= male; "1 = female". Or just male (enter) female. Either way, if I use the drop down menu, the "male" or "female" should appear in filemaker, but I when I export it I only want the "0" or "1"
Does that make more sense?
When i use CSV it does this correctly.
Yes, now I see - I have managed (with some difficulty) to reproduce the issue.
I'd suggest you solve this problem at its source, which is the value list. Instead of custom values reading:
0 = male
1 = female
create a new GenderVL table with two fields, ValueID (Number) and Value (Text).
Then change your value list to use values from GenderVL::ValueID, also displaying values from GenderVL::Value (show values only from second field).
Alternatively, use a value list of just 0 and 1, and format the field to show "Male" or Female" (under Format > Number… Format as Boolean).