Patents have certainly been granted, but the language I link to above is very clear about the validity of such patents:
"The following in particular shall not be regarded as inventions [...]: schemes, rules and methods for performing mental acts, playing games or doing business, and programs for computers."
"The following in particular shall not be regarded as inventions [...]: schemes, rules and methods for performing mental acts, playing games or doing business, and programs for computers."
[my emphasis]