March 7, 20241 yr Newbies Howdy! I am using "Write to data file" in FM19 to add a row of titles to an existing csv file and am running into an issue where part of the first row of data is being removed. I have tried toggling the UTF setting and the append option on and off to no avail. Most examples that I find for Write to data file seem to be for creating files, not adding to them. Thanks in advance for any insight!
March 7, 20241 yr When you write to a data file, you always overwrite, not insert. To add a title row, you need to read from the data file into a variable, add the title row and write the result back to the data file. See the demo here: https://fmforums.com/topic/109501-exporting-a-custom-header-to-excel-from-filemaker-with-a-special-character-like-£/?do=findComment&comment=490073
March 7, 20241 yr Author Newbies Thanks for the info. The problem is that some of our files are hundreds of mb in size, so reading them into a variable is not feasible. Looks like I may need to look into the XSLT method, or just rig the server to do a simple shell script to do it. Thanks again!
March 8, 20241 yr There is yet another method you could explore: https://fmforums.com/topic/106980-can-i-write-data-to-a-textfile-using-fmpro-16/?do=findComment&comment=483109
Create an account or sign in to comment