Csv file blank data

i have one csv file…in that file there are some employee data
in data there are some blank data
i want output like if employee data is blank the missing data with the header of the column name

Hi @purnima_mandan

Can ypu be clear if data is missing then what data you want? You need only column names? Where you have atleast one empty cell?


if data is empty then make a new column name and writedown a header of the column name which column is blank


Can you share a sample input and output… its little confusing to understand like this


test.xlsx (16.1 KB)
sheet1 is inputdata
sheet2 is output
this is excel file but i want output in csv file


How about the following sample?

dtResult = dt.AsEnumerable.Select(Function(r) dtResult.LoadDataRow({r(0),r(1),r(2),String.Join(",",dt.Columns.Cast(Of DataColumn).Where(Function(dc) String.IsNullOrEmpty(r(dc.ColumnName).ToString)).Select(Function(s) s.ColumnName))},False)).Where(Function(r) not String.IsNullOrEmpty(r("missingdata").ToString)).CopyToDataTable

Sample20221208-7.zip (14.4 KB)