How can I remove empty space in end line #275
-
Hi Guys, I'm using ChoETL library to read some files and I have a problem with txt files, When I read the lines in a file with 265 lines, about 10 lines it is reading correctly, but the others are shown only null and when I change white space end line in one of the 10 lines correctly, the program return null in this line too. I'd like to know How Can I remove Empty Space in end line using ChoFixedLengthRecordFieldConfiguration or ChoFixedLengthReader? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
pls write sample fiddle at https://dotnetfiddle.net/ and explain more in detail, will try to help u with the issue. |
Beta Was this translation helpful? Give feedback.
-
Well, currently I doesn't allow variable record length. But you can solve by adding https://dotnetfiddle.net/niuJEi FYI, in the fixed length record file parsing, all fields must be specified with |
Beta Was this translation helpful? Give feedback.
-
Hi, I work with Alessandro. |
Beta Was this translation helpful? Give feedback.
Well, currently I doesn't allow variable record length. But you can solve by adding
OnBeforeRecordField
event and adjust the line. Here is the working samplehttps://dotnetfiddle.net/niuJEi
FYI, in the fixed length record file parsing, all fields must be specified with
startindex
andlength
. Otherwise, results will be unexpected.