direct speech to indirect speech [closed]

There's no "exact" way to convert exclamatory utterances from direct to reported speech. Here are my best efforts for a few typical examples...

1: "What a pity!" said John = John said it was such a pity
2: "How kind of her!" said John = John said she was very kind
3: "Thank you, Jane" said John = John thanked Jane

...but the bottom line is you simply have to rephrase each specific example as best you can (though as commented by @Edwin, it might help to use exclaimed or similar instead of said).