"It does not update the data, means edited data in dataP array is not reflected" Well, did you write out dataP? No. You wrote out Raw only. So you did not write out anything that got changed, so of course nothing got changed. Write out dataP if you want a new dataP in the workbook file.
By the way, don't use All for a variable name - it's too close to a built-in function called all().