the app was created by someone else so i'm trying to use the existing code
in it. What's happening is that the app reads a file and validates the data
in the file, if the data is invalid for any reason it writes an error to an
Error arrayList then writes those errors to an text file. BUT I know need to
write the error message to an excel file BUT I need to match the errors to
the data that it is erroring out on. When I try to write the errors to the
excel its only writing the last error.
example:
data looks like this
BMW 20051212 John Smith New
BMW 20041210 John Smith
I have rules to check this data and validate the date format, and verify the
make, name, price and new or used is there, since the price is not there an
error would be created.
"price not in file".
so i need to write
record 1 error
BMW John Smith - price not included in file
record 2
BMW John Smith - indicator 'new' or 'used' not included in file
how can i get both errors for the one record to write to my file? I get the
last error to write but not both.
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
NuCoder <me@me.com> wrote: How can i get an item out of an ArrayList to write to a file?
I want to add the items to a collection to write them to a file.
Which bit are you stuck on? What kind of items are you wanting to
write, and in what format?
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too