Shaun Posted February 19, 2019 Report Share Posted February 19, 2019 Hi All, I'm storing data in a Data Table. Once a day I write the data to a file using the "Store DTI to File" instruction. It all works well and a file is created. I'm then using Excel VBA to read the data in one line at a time. The issue I am having is that the CSV file has comma "," separating the lines. How do I get the Unitronics software to install a line break after each row from the data table? Quote Link to comment Share on other sites More sharing options...
NoamM Posted February 19, 2019 Report Share Posted February 19, 2019 Hi Shaun,"Store DTI to File" G parameter is the CSV file delimiter, change it to whatever you like. Quote Link to comment Share on other sites More sharing options...
Shaun Posted February 19, 2019 Author Report Share Posted February 19, 2019 Hi Noam, Just so that I understand correctly. When the above instruction writes to a file it will put a comma between the data in a row and whatever we put into G between different rows. So if I was to put "\n" in G I would get a new line in my file for each row in the data table. Cheers, Shaun Quote Link to comment Share on other sites More sharing options...
NoamM Posted February 19, 2019 Report Share Posted February 19, 2019 I did not tested it but yes, that string value in G will use as the CSV delimiter Quote Link to comment Share on other sites More sharing options...
Shaun Posted February 19, 2019 Author Report Share Posted February 19, 2019 Thanks mate I will try it next time i am on site Quote Link to comment Share on other sites More sharing options...
Saragani Posted February 19, 2019 Report Share Posted February 19, 2019 I think that NoamM did not understand your question and your request, The Delimiter G is what used to separate columns, not rows. Rows are separated with \n (0x0a) Each column has a comma after it, even the last one, so if you have 2 columns, the data will look like: A,B,\n C,D,\n etc.. You can take the CSV file and open it with a HEX editor and see the \n at the end of each line. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.