Merged cells issue

I am reading from an excel that have merged cells

when i try to write the excel in my sheet all merged cells get mixed up .

I cannot control the merged cell range since the data is not fixed and fetched from other application

1 Like

@FMK
we would assume that in F we do find Tasks and in j Completeted Tasks
in the next row in F we do find Task 1 …

Within a column name adjuststement run the control on column names can be get back and also can be dynamic

1 Like

Hi ppr

i couldn’t understand what do you mean

1 Like

@FMK
can you share a sample EXCEL with me. Based on this I can elaborate my idea. Thanks

1 Like

FileToReadRangFrom.xlsx (12.1 KB)

The final file when i try to write into it

FileToWriteRangeTo.xlsx (11.4 KB)

I also notice that column E,I , T , W changes the format and adds a year to it !

1 Like

@FMK

Do you need the columnnames while processing the input data or is it column access only done via column index?

2 Likes

Yes i can process it without the column names

1 Like

@FMK
while readin and header detetection (add headers Flag) the row is used for header names. As it has merged cells it will split and:

  • set the value to the first split - Column F with the name Tasks
  • empty cells are producing a default name

As far as I do understand your question is how to handle this for the writing back to excel

Here we can think about following

  • readin original excel without add headers
  • removing the first 2 rows
  • doing the processing
  • writing back to another prepared worksheet with already filled first 2 rows with the header names
    • append range activity without headers (add header is unchecked)

As an alternate the readin column names can be flatten and renamed (Task_Task5) and the second row will be deleted. Another technique is to rename same as in Excel to the collumn letters A,B,C…)

Let us know your feedback

1 Like
  • readin original excel without add headers
  • removing the first 2 rows
  • doing the processing
  • writing back to another prepared worksheet with already filled first 2 rows with the header names
    • append range activity without headers (add header is unchecked)

this worked for me thank you very much

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