"I have not said that!"
Translation:Nie powiedziałam tego!
The difference is in speaker's gender - 'powiedziałem' is male, 'powiedziałam' is female.
Yes, but here 'that' is not a real determiner (it doesn't describe any noun), it's a dummy pronoun. This sentence could be "I have not said [that/this/it]!", all those versions would be okay in English, but it's still translated to "tego".
It actually works similarly as in a "This is Y" sentence, where all three: "[This/That/It] is..." would be translated as "To jest..."
Think of "tamto" (and tamtego) as "that there" instead of simply "that." It implies distance away from you. Think of "to" as both "this" and "that." Już to wiem can be both "I already know this" and "i already know that."
Hmm, I was tought that the pronoun should not go at the end if it can be circumvented. Still I was marked wrong with "tego" in the middle ;_;
There is more important rule: you cannot separate "nie" from its verb. If you do, "nie" is applied to another word and it changes the meaning of the sentence. Here, it would be "Nie to powiedziałam." meaning "It wasn't this that I said.(I said something else)". "Nie powiedziałam tego." means "I didn't say this.(It's not important if I've said anything at all.)"
I thought "dlaczego tego powiedziałem" would be more valid, especially as "that!" Is emphasised. Isn't that how it works?
I'm sorry, but your sentence doesn't make sense. Firstly, you used "dlaczego" (="why") for some reason, and then it's either "to powiedziałem" (as "powiedzieć" takes Accusative) or "tego nie powiedziałem", if you negate "powiedzieć" and therefore use Genitive.
I mean, obviously to translate this sentence, only "tego nie powiedziałem" option works.