Merge selective rows from each sheet in workbook to another workbook

I have a PDF file PriceBook.pdf (711.3 KB). I read that and created an Excel file.

Now I have developed Console Application (7.4 KB) in which I’m trying to merge certain cells from the worksheet in the workbook to another workbook.

Please see the snapshot End goal.png (75.1 KB) that explains detail visually.

Can you guide me on how to proceed next in the project attached?


To copy or move range of cells data, you may use methods Copy or MoveTo.

For your requirement we think you also need to check the edge of the range to be merged. If you have created those ranges as table in your excel file, it is easier for you to get the edge by DataRange and you can traverse those tables by ListObjects.

If you have not created those ranges as table, then you have to check the edge of those ranges by your own logic according to your business requirement. For example, may be you need to traverse all cells data(such as by GetEnumerator) to check special cell value(such as if one cell’s value is “Pad Size” or “Normal Size…”, and some examples here for your reference). Also you may use Find to search those key values and take the found cell as start of the range(some example here for your reference).

Hope those references can help you to achieve your goal with Aspose.Cells. And feel free to contact us if you need to know more to implement your application with our component, and we will be glad to provide assistance.