I have one Excel file i have to identify the company type there is one condition After Blank row only one row and then again blank row then it should be single company and if after blank row. there is multiple rows. and after that again blank row then it should be multiple company and i want to seggregate single and multiple company.
how i can achive this anyone could help me it would be great.
I am Attaching screenshot to understand better
(From d in dtData.AsEnumerable()
Where not (isNothing(d(0)) OrElse String.IsNullOrEmpty(d(0).ToString.Trim))
Let gk = System.Text.RegularExpressions.Regex.Match(d(0).toString, "^\D+").Value.Trim
Group d by k1=gk into grp=Group
Like there coule be any kind of data means as i mentioned in the screenshot if there are continue rows then it should be multiple scenario and if before and after blank row and single row then it should be single company
This worked but i want to identify if its single or multiple base on that i want to take decision if its single row i want to create invoice for single company and if its multiple create multiple invoices.