Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INotifyRead not working with ExcelNPOIStorage #263

Closed
DCSCardenass opened this issue Oct 24, 2017 · 2 comments · Fixed by #402
Closed

INotifyRead not working with ExcelNPOIStorage #263

DCSCardenass opened this issue Oct 24, 2017 · 2 comments · Fixed by #402
Labels

Comments

@DCSCardenass
Copy link

DCSCardenass commented Oct 24, 2017

When I implement INotifyRead doesn't seem to work with ExcelNPOIStorage, the process ignore the BeforeRead and AfterRead methods

This is the example I am using, I have a class User: this class implements the interface INotifyRead

` [DelimitedRecord("|")]
public class User : INotifyRead
{
public string FirstName;
public string LastName;

    [FieldConverter(ConverterKind.Date, "yyyyMMdd")]
    public DateTime mydate;

    public void AfterRead(AfterReadEventArgs e)
    {
    }

    public void BeforeRead(BeforeReadEventArgs e)
    {
        int x = e.LineNumber;
    }
}`
@netniV
Copy link
Contributor

netniV commented Nov 22, 2017

ExcelStorageBase which is inherited by ExcelNPOIStorage does not implement the filehelper INotify interfaces. In fact, it doesn't implement the older BeforeRecord/AfterRecord style events either.

@mcavigelli
Copy link
Collaborator

Yes, the behaviour is as expected and as commented by @netniV .

I have added a hint on the examples (on website on next publish of the documentation, depends on #385) and the interfaces INotifyRead and INotifyWrite.

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

Successfully merging a pull request may close this issue.

3 participants