简体   繁体   中英

Azure Data Factory - Import excel file with dynamic range2

I have a scenario where I'm converting Excel to CSV/TXT my excel file is formatted,which means main content starts at let's say A12 but end cell is dynamic( like Y400 or y700 etc..) that we don't know, in that case is there a possibility in ADF to define Excel range.

There is a range option in adf for excel dataset wherein you can mention the dynamic range as below:

A12

This would start from A12 and dynamically locate the end point

range:- The cell range in the given worksheet to locate the selective data, eg:

  • Not specified: reads the whole worksheet as a table from the first non-empty row and column
  • A3: reads a table starting from the given cell, dynamically detects all the rows below and all the columns to the right
  • A3:H5: reads this fixed range as a table
  • A3:A3: reads this single cell

Use a DataFlow and follow the below steps:

1.Add your excel/CSV Source data set( Insert 'FileName' in column to save filename 2. add filter activity and insert 'length(trim(replace(trim(replace(replace(replace(replace(replace( toString(array(columns()) ),'null','' ), ',',''),FileName,''),'[',''),']','')),'""',''))).= 0' 3. Boom!! empty rows are gone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM