how can i simulate the function of WORD TABLE,that can split and meger cells arbitrarily,any code can help? thank you all

the most important thing is split a cell like the pink area