I'm creating a CSV using an XLSX file as a Source using a simple Copy Data Activity. The CSV file creation is happening properly.
However an empty line is being added at the end of CSV file. Is this by design? Is there a way to remove the Empty line at the end of the file.
an empty line is being added at the end of CSV file. Is this by design?
As per information you have provided, it seems to be new line is getting added in the last of csv.
This is because a newline character (\n) is automatically added at the end of the file when the Copy Data action sends data to a text-based file (such a CSV). This behavior is deliberate since it makes sure that the file is correctly closed with a newline character (\n).
It your file is adding empty rows please check the range you have provided in Excel dataset whether there is an empty row.
Is there a way to remove the Empty line at the end of the file.
If your file has empty line like below its fine it dose not affect any thing and Unfortunately, there is no way to remove the empty line at the end of the file.
If your file is adding empty row like below, then using the dataflow transformation you can delete those.