Use StringFormat to convert your variables to strings with your separator in between. Write the string.
William Roeder:
Use StringFormat to convert your variables to strings with your separator in between. Write the string.
Use StringFormat to convert your variables to strings with your separator in between. Write the string.
Would I need to do some variable conversion in excel? Or will excel still be able to recognize the data type?
CSV is a text file. There are no data types in a text file.
William Roeder:
CSV is a text file. There are no data types in a text file.
CSV is a text file. There are no data types in a text file.
Oh my apologies, that was a brain fart, thanks
William Roeder:
Use StringFormat to convert your variables to strings with your separator in between. Write the string.
Another quick question, is there an easy way to add a delimiter this way or do I just do it the brute force way (StringFormat("%f; %f; .... ; \r\n"), arg1, arg2, ...). Is there some sort of custom regex shortcut?
Use StringFormat to convert your variables to strings with your separator in between. Write the string.
- That is the easy way.
- Drop the spaces; you don't write spaces with the FileWrite.
- Drop the last separator. It's a separator, not a terminator. "%f;%f"
- Drop the "\r\n"; part of the FileWrite.
William Roeder:
- That is the easy way.
- Drop the spaces; you don't write spaces with the FileWrite.
- Drop the last separator. It's a separator, not a terminator. "%f;%f"
- Drop the "\r\n"; part of the FileWrite.
works, thanks. This saves me a lot of time
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to build a CSV file where the columns exceed the max number parameters that can be taken into FileWrite (which according to the documentation is 63).
Is there a way to to split up the FileWrite so that I can write to more than 63 columns? The data types of my parameters include datetimes, int, and doubles.
I was thinking of putting consecutive FileWrites in a row, but according to the documentation on FileWrite, "/r/n" gets added automatically to the end of each line.
Thanks in Advanced