How to read a column in a tab-delimited Excel file in C#?

Posted by janejanejane on Stack Overflow See other posts from Stack Overflow or by janejanejane
Published on 2010-12-24T02:49:47Z Indexed on 2010/12/24 2:54 UTC
Read the original article Hit count: 233

Filed under:
|
|

I have some data of an excel file below. At first, I figured that reading from the file could be done using the Excel Library then using an OLEDB connection. I managed to get the DocumentNo column data with the OLEDB approach. However, when the excel file is closed, I am unable to do the operation because it gives an error that "External table is not in the expected format." How can I read from the file even if it is closed?

10/4/2010                                                                            Paid Documents for Document Tracking - Customer                                                                        1

Paid Documents for Document Tracking - Customer                                                                                     



    CoCd    Customer    Trans.type  SG  Clearing    Clrng doc.  Assignment  Year    DocumentNo  Pstng Date  Doc. Date   Entry Dte   Crcy

    PLDT    5000007     4           4   1/15/2010   25003413    5000007     2010    408000139   1/7/2010    1/5/2010    1/12/2010   PHP
    PLDT    5000007     4           4   1/15/2010   25003634    5000007     2010    408000068   1/5/2010    12/22/2009  1/10/2010   PHP

© Stack Overflow or respective owner

Related posts about c#

Related posts about excel