Akhilesh Murthy wrote:As a .csv file is stored in form of an excel
No, a CSV file is a "comma-separated-value" file. That is, a plain text file that uses commas (or some other delimiter) do separate one field from another.
the fields are populated based on the date written. Now my question is how can i write into a specific cell of the file. i.e, specific cell of the excel file.
As I said: Read the file, find the appropriate place, change what you need to change, write the object model back out to the file.
This is the
only way to do it; you can't just modify some part of the file directly, unless you a) know ahead of time the exact byte position of where you want to make the change AND b) the change you make will not use any more bytes than were already allocated for that field in that file. (And if it meets those conditions, then it's not really a CSV file.)
Now, there may be libraries out there--such as POI or a CSV manipulation library--that will abstract away the details of finding the cell and re-writing the entire file, so that you can just do something like
setValue(row, column, value). If that's what you're looking for, see the link in the first reply.