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

Multiple changes below #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FaustoNascimento
Copy link

Added RowCount and ColumnCount parameters
Added IgnoreEmptyCells parameter (if used, the object will not have empty properties. If the resulting object contains no properties at all (because they are all empty), then no object will be sent to the pipeline.
Both RowCount and ColumnCount allow the user to specify past the used boundaries of the worksheet, which will start outputting either objects with all blank properties (if the row is past the used boundaries) or objects will contain extra empty properties (if the column is past the used boundaries). This is a powerful tool that simplifies say... adding a column to an existing Excel worksheet: just increase the number of columns to return by one, set it's value on the objects returns and export it back to Excel. Be aware that if used in conjunction with IgnoreEmptyCells the bounds of the worksheet will be enforced (and obviously any empty cells in the middle will be ignored)
Added RowHeader, so you can now specify which row to use as the header. Defaults to row 1
Added some nicer logic to the headers:
Header array will always be used first, but its size no longer needs to match the number of columns to read
If the Header array is not specified, or the columns to read exceeds the Header array limit, it goes back to using the RowHeader value (if FirstRowIsData is not set).
If the FirstRowData is set, the column's header for a particular column is empty or a Header element is empty, it will be replaced with ColumnX, where X is one or more letters with a unique identifier to the column (same as Excel does) - Example: ColumnAX
Lastly, if a header from the RowHeader is repeated, an index will be added to it. Example: if there are two columns named Test, on importing the first will be named Test the second will be named Test1. If there were a third, it would be Test2, etc. If a header from the Header array is repeated it will behave as if it was empty (i.e., try to first use the RowHeader for that column or ColumnX naming notation).
If an excel file contains empty rows/columns to the left (i.e, before the data actually starts) they will be ignored by default. Use -RowStart or -ColumnStart to override this.

Added RowCount and ColumnCount parameters
Added IgnoreEmptyCells parameter (if used, the object will not have empty properties. If the resulting object contains no properties at all (because they are all empty), then no object will be sent to the pipeline.
Both RowCount and ColumnCount allow the user to specify past the used boundaries of the worksheet, which will start outputting either objects with all blank properties (if the row is past the used boundaries) or objects will contain extra empty properties (if the column is past the used boundaries). This is a powerful tool that simplifies say... adding a column to an existing Excel worksheet: just increase the number of columns to return by one, set it's value on the objects returns and export it back to Excel. Be aware that if used in conjunction with IgnoreEmptyCells the bounds of the worksheet will be enforced (and obviously any empty cells in the middle will be ignored)
Added RowHeader, so you can now specify which row to use as the header. Defaults to row 1
Added some nicer logic to the headers:
Header array will always be used first, but its size no longer needs to match the number of columns to read
If the Header array is not specified, or the columns to read exceeds the Header array limit, it goes back to using the RowHeader value (if FirstRowIsData is not set).
If the FirstRowData is set, the column's header for a particular column is empty or a Header element is empty, it will be replaced with ColumnX, where X is one or more letters with a unique identifier to the column (same as Excel does) - Example: ColumnAX
Lastly, if a header from the RowHeader is repeated, an index will be added to it. Example: if there are two columns named Test, on importing the first will be named Test the second will be named Test1. If there were a third, it would be Test2, etc. If a header from the Header array is repeated it will behave as if it was empty (i.e., try to first use the RowHeader for that column or ColumnX naming notation).
If an excel file contains empty rows/columns to the left (i.e, before the data actually starts) they will be ignored by default. Use -RowStart or -ColumnStart to override this.
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.

1 participant