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

Allow pre-defined empty column types #899

Closed

Conversation

ArslanaWu
Copy link
Contributor

Thanks for contributing.

Description

Fix issue #822 by letting user specify the type of empty column in advance.

Testing

Add columns-with-empty-column.xlsx, which has one empty column.

Add two test in XlsxReaderTest.java

  • testColumnsWithEmptyColumn()
    Determine whether the empty columns have not been created when the user does not specify the type of empty columns
  • testColumnsWithEmptyColumnAndPreserve()
    Determine whether the empty columns are created and the type is correct when the user specifies the type of empty columns

@lwhite1
Copy link
Collaborator

lwhite1 commented Apr 18, 2021

I'm not sure I agree with the design here for two reasons:

  • I suspect that the existing CsvReadOption columnTypes method could handle this use case if it were added to the Excel read options (or better, to the ReadOption base class).
  • If that's not the case, then this method should be generalized so that it covers the other file types.

Between the two , I have a strong preference for using the columnTypes method unless that's not feasible for some reason.

@ArslanaWu
Copy link
Contributor Author

I think you are right, sorry for disturbing.

@ArslanaWu ArslanaWu closed this Apr 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants