Multisite Hacked. Can I reinstall WordPress or ProSites and not lose any of the current data?

My multisite has recently been compromised and I was wondering if reinstalling a fresh wordpress install or reinstalling prosites would delete any hidden code the hackers may have put in my site? Would it make me lose any of my current data? I know that many hacking issues may not have anything to do with these, but in the case that it does I would like to know.

Thanks!