Article 279 [source]

Spanish Criminal Code
English translation

The disclosure, revelation, or transfer of a trade secret by someone legally or contractually obligated to maintain confidentiality shall be punished with imprisonment for two to four years and a fine of twelve to twenty-four months.

If the secret is used for personal gain, the penalties shall be reduced by half.