Swiss foreign trade managed to withstand the headwinds, although momentum only picked up in the second half of the year, the EZV said in news release issued on Tuesday.
Both exports and imports increased slightly with the trade surplus rising 860 billion francs from 2011.
Just three industries — watches, pharmaceuticals and food — fueled the growth in exports, which grew overall by two percent to 201 billion francs, with all of the growth outside Europe.
The Swiss watch industry, with exports rising 11 percent to a record 21.4 billion francs, recorded sales that were a third higher than five years earlier, according to the figures.
The chemical and pharmaceutical industries were the biggest contributor to Swiss exports, valued at almost 79 billion francs, up 5.8 percent from the previous year.
By contrast, the machine and electronic industry saw exports tumble 9.6 percent to 33.5 billion francs, falling back to a level not seen since 2004.
In this category, sales of textile machines saw the biggest drop, of 28 percent, to just over one billion francs.
Sales to foreign countries of Swiss food, beverages and tobacco rose 3.4 percent to almost 7.7 billion francs.
The customs administration said ailing European Union demand (down one percent) was more than offset by additional exports to the US (up 12 percent), Canada (up nine percent), Latin America (up around 10 percent) and other parts of the world.
Exports to China, however, fell by 12 percent, while those to India dropped by 10 percent.
Imports rose 1.2 percent to 177 billion francs, led by consumer goods, which rose more than three percent to 78 billion francs.
Car imports increased less than one percent to more than 10 billion francs.