How to merge datatble cells for two columns or more

I have this link

Here I nees to capture this table

After capturing the table into datatable when writting the datatble in excel, getting this output as follows

Please refer the attached excel for reference. USState.xls (21 KB)

I want to get the output as it is in the table showing on the webpage. Can anyone help with the solution.


Please suggest some solution on this topic if possible.


Basically, we can merge cells using Alt+H M C in Excel.

So the following sample might help you. (16.3 KB)

Note: Some selectors for excel might be needed tuning for your environment.


1 Like

Thanks a lot for this work around. Is it possible to do this merge function from the datatable, and then we can write that formatted datatable into excel?


Unfortunately, as DataTable is not worksheet, there is no concept of merge cell and format etc in DataTable. Probably we need to acheive it on excel worksheet.


Thank you for the solution.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.