How to skip the last row from an excel source

bk 461 Reputation points
2021-08-04T15:37:27.287+00:00

Hi All,
I am loading excel files into ADLS and then into SQLMI. The incoming excel files are from a third part reporting tool that spits the output as an excel. All these excel sheets have a "TOTAL" at the end. Is there a way to skip the last row when COPY ing the files into ADLS?
Thanks

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,704 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nandan Hegde 29,901 Reputation points MVP
    2021-08-05T03:53:24.757+00:00

    Hey @bk ,

    The below logic might help :

    1. Get the overall row count of the excel sheet :
      https://learn.microsoft.com/en-us/answers/questions/35029/how-to-get-row-counts-from-files-stored-in-azure-s.html

    2) Then via Range parameter in excel dataset :
    rownbr-1

    That should help you to skip the last row and the column range would still be dynamic