Here i want to extract a unique Area . And i want the output in table formate like borders and columns we do manually in excel. The output Should be like this
Please share a screenshot or example file of input and expected output. Do I understand correctly that you want to recreate the borders formatting from original file?
Not only Borders But I also want to create the columns of distinct values of each row in a column.
Here Area is the Header of that particular row and axile is the header of 2nd row.
For One DOM we have Two Axile.So We need to produce output like this
Ok, I think I understand now, does the image show what you are trying to achieve?
First of all, does it matter whether the data is stored horizontally or vertically in excel? It would make the task a lot easier if we could use “Area” and “Axile” columns instead of rows.
Read range
Remove duplicates
Sort by Area and Axile (use Invoke Method: dataTable.DefaultView.Sort = “Area, Axile”)
Write Range to Excel.
If horizontal layout has to be kept, then you need to transpose data before reading it and after writing it to excel.
Borders and cells merging can be executed by “Invoke VBA” and executing VBA macro inside the excel file
Output Step2 is correct but beside DAM “Area” Header should also be there as a separate column.And the formate should be like this only as you showed in Output step2