My task is to write data to csv file after parsing data from Log file.
By using DataInputStream i am able to parse the data in the Log file and now how i can write parsed data to CSV file?
Please see the below code:
posted 6 years ago
Do you know what a CSV file looks like internally? If so, what would you have to do in order to create such a file?
Of course, if you have just a single value in each row, then there isn't much difference between a non.CSV text file and a CSV file.
Lastly, if the data that's supposed to go into the CSV gets more complicated, then you should consider using a library for creating such files - the format does get more complicated to generate if you can't make any assumptions about its contents. The AccessingFileFormats page links to several available CSV libraries.