I think it is not possible. but you can use any programming language to convert the txt file. I had previously change between BMP file and Text (output of VHDL test bench using MatLab".
I'm not sure if I understand the original question. If you're asking if you can read and write hex data from text files in your test bench, the answer is yes.
I believe the library is IEEE.std_logic_textio and the functions that you want are hread() and hwrite().