0

I have been working on extracting text from a csv file and store the data in a string. But now, I would like to extract text from some of the specific columns and store the data in a string.I would like the wordDocContents variable to contain the specific columns and the data in those specific columns which is bank_account, bank_name, customer_name. Currently, my wordDocContents has the entire data from my csv file. Is there a way to filter out the specific columns and the data in those columns and store it in the variable wordDocContents. Thanks

Here is what I tried so far -

public void button1Clicked(object sender, EventArgs args)
{
    button1.Text = "You clicked me";

    var textExtractor = new TextExtractor();

    var wordDocContents = textExtractor.Extract("t.csv");
    Console.WriteLine(wordDocContents);
    Console.ReadLine();
}

1 Answer 1

2

I believe you are looking for class to parse structured files.

Check out https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser.aspx for details.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.