Chosen Solution

I have a xperia z3 compact tablet, but it needs a new micro-usb port, but i could not find it so could a xperia z tablet port fit in it.

If its part of a board, then no, the boards do not match. The port itself, if you are good at soldering, yes. You could buy just a port from Ebay for very cheap. https://www.ebay.com/sch/i.html?_from=R4