PSExcel icon indicating copy to clipboard operation
PSExcel copied to clipboard

Multiple changes below

Open FaustoNascimento opened this issue 9 years ago • 0 comments

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.

FaustoNascimento avatar Aug 18 '16 11:08 FaustoNascimento