The United States failed today to put the Security Council on record against spy trials for the 49 remaining American hostages in Iran, when 13 of the other 14 council members raised objections to any such public statement.

American efforts did produce a statement by the General Assembly president Salim A. Salim of tanzania, who expressed his gratification that 13 hostages have been freed and appealed for a second time that "the remaining hostages be released without delay."

Salim, a Moslem, said that his appeal "represents the collective concern of the international community, who clearly feel strongly that the sanctity of diplomtic premises and diplomatic personnel must be respected without any exceptions at all times."

In Brussels, the nine-nation European Economic Communtiy today condemned Iran for failure to protect U.S. diplomatic personnel. In a joint statement, the foreign ministers of the nine-countries said that "whatever the nature of the dispute between Iran and the United States, the continued holding of diplomatic personnel of the embassy of a foreign state must be rejected by the governments of the nine and by the international community as a whole."

Whatever the differences between Iran the United States, Salim said, "it is crucial that international law governing the treatment of diplomatic missions and their agents be scrupulously observed."

The security Council president, Sergio Palazios deVizzio of Bolivia, said, the 13 delegations were reluctant to issue a second appeal to Iran before the Tehran government has responded to the Council's Nov. 9 appeal for the release of all the hostages.

The general feeling, he said, was that a new appeal would do no good and would damage the integrity of the Council.

American Ambassador Donald McHenry, in response to these arguments, said today that, "we are not opposed to either bilateral or multilateral discussions with Iran. However, those discussions have to proceed in the context of the release of the hostage."

This statement was intended to reaffirm American opposition to a public U.N. debate until the freedom of the remaining hostages has been assured.

The ofter of bilateral talks was a reference to McHenry's effort to meet with Ahmad Salamatian, a special envoy sent here by Iran's acting foreign minister Abol Hassan Bani-Sadr. Salamatian has been pressing the iranian case with Third World delegations, but has thus far turned aside offers for a meeting with American officials, according to U.S. sources.