Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Importing .txt file creates text that isn't in the file. #14

Open
TomJLynch opened this issue Oct 2, 2017 · 0 comments
Open

Importing .txt file creates text that isn't in the file. #14

TomJLynch opened this issue Oct 2, 2017 · 0 comments

Comments

@TomJLynch
Copy link

I attached a small sample to demonstrate this problem. I am reading data in from a .txt file. For both rows of data after the header, I have an empty string in column 5. For the first row, the text "column5" is in that cell. All later rows will correctly have an empty string.

Please use the TestFile.txt file in the solution and put it at the root of your C drive. Put a break point in the code inside default.aspx.cs at the bottom of the for loop. Launch the web site. Click the single button on the page. At the break point, if you inspect the values of all the string variables you'll find all the data imports correctly except for column 5 of the first row, where the text "column5" appears.

There is a work around. If I set format.SkipLinesBeginning to 0 and start my for loop on row 2, the problem doesn't happen. But I figured I'd let you know about this bug.

TextImportError.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant