0

I'm pretty new to this but i am not really sure why this isn't working. I have a tab delimited file i am trying to import using vb.Net and FileHelpers.dll

Imports System 
Imports System.Collections.Generic 
Imports System.Text
Imports FileHelpers 

Namespace CompanyRejects
    <DelimitedRecord("\t")>
    Public Class Rejects       
        Public Source As String        
        Public PayerID As String        
        Public ClaimID As String       
        Public EmdeonClaimID As String
        Public PageNum As String
        Public RejectDate As String
        Public ProviderTaxID As String
        Public RejectCode As String
        Public RejectReason As String
    End Class 
End Namespace

Code line reading the file in (%path% is a specific path where the file does exist and can be opened)

 Dim RejectEngine = New FileHelperEngine(GetType(CompanyRejects.Rejects))
 Dim res() As Object = RejectEngine.ReadFile(%path%)

 For Each item As Object In res
     Call ImportRejectFile(item)
 Next

when i try to process the file i get the following error on the rejectengine.readfile line.

"The delimiter '\t' can´t be found after the field 'Source' at line 1 (the record has less fields, the delimiter is wrong or the next field must be marked as optional)."

i went in and change the Delimiter to a "|" and it read fine, as much as i would like to i am not able to change the Delimiter since the file will be generated from another company.

Any help on this would be great, thanks,

file information is listed below

TEMP    PAYID   1030602004765   1661663295  1   10/28/2010  g   555 XXXXX
Sifu
  • 1,082
  • 8
  • 26

0 Answers0