How to read the particular column and their sub columns in excel and write to word document

Hi, I want to read the column and their sub column and write into word file. Please find below screenshot for reference.
I want to read the Gender column and Male, Female, Other are sub columns as below

Above is the output format should look like

Duplicate:How to fetch Columns and sub columns from excel and write into word

Hi @Rohit_Patil1

When you read the page as datatable(dt) with header un checked you will get the values into single cells in datatable

for example Gender in your scenario can be accessed as dt.rows(0)(4).ToString

and for male female and others dt.rows(3)(4).ToString,dt.rows(3)(5).ToString and dt.rows(3)(6).ToString


Thanks Anil, Let me try with this method

1 Like

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