In csv file there are some missing data of employee in that i have to paste the header in the place of blank data

i have a one csv file in these file there are some blank data and these blank data i have to paste the header of the colume in the new csv file
can you help to solve these error please

Hi @purvika_jethwa

Read the excel into datatable

Then use a for loop to loop through the columns dt.Columns (type argument : string)

Inside loop use filter datatable with column name as the for loop item variable and select is blank

next check if out dt is having zero rows if zero then you have no blanks if not there are blanks save the appropriate column name

cheers

in the filter data table what is the condition we have to use

Hi @purvika_jethwa

Select IsEmpty

cheers


but in the value filed i cannot write anything

Hi @purvika_jethwa

give the column name from the for loop item. Neednot give any value as you want to check blanks

cheers

Hi @purvika_jethwa

Dont use for reach row

you have to use for each and in the list of items property give DT.Columns and change type argument property to DataColumn

then given the currentitem.ColumnName in the filter datatable column

If you select keep it will keep the blank value rows…if you selecy remove it will remove the blank value rows. accordingly do a count on the output datatable

cheers


i got the errror

Hi @purvika_jethwa

you have to give dt.Column I see a typo there

and secondly dont give the name …give only one line remove all others…then give item.ColumnName

Then add if condition after that and check dt_Colume.rowCount.Equals(0)

If yes then that column has no blanks else that column has blanks

cheers

where we have to give item.colume name

Hi @purvika_jethwa

Here

image

Cheers

in the columNAME WE have to only right
item.current department

Hi @purvika_jethwa

We have to write item.ColumnName

cheers

then we have to create variable columename

Hi @purvika_jethwa

ColumnName is not a variable it is the property of the datacolumn. And one more thing is to change in For each (Select the type argument as DataColumn instead of String)

This would give you the name of the column

cheers


now its right
or wrong
and in the for each what we right in the In coumn

Hi @purvika_jethwa

Perfect. NO Changes

Just add a if condition to check the row count

cheers

what is the condition we have to right

Hi @purvika_jethwa

dt_Colume.RowCount.Equals(0) this mean in filter you are trying to get the blank value related columns. Now if any blank value columns are found then the row count of those will be more than zero. So If this condition is true then that means there are no blank values in that column if the condition is false there are blank columns

cheers

what is rows.count