Actually, I heard that pretty much about every countries and experienced it myself (including in the US where people are supposed to be warm and welcoming) so I'm not sure Sweden is so different. Expats always have a hard time making local friends. The reason is that people have already their friends and routine, plus the language and cultural difference. Even in our own country, I think most of us don't make new friends every day (especially when getting older).
This is pretty common for all nordic countries. It's really tough getting to know people, even if you're native. I recently moved from a small town to the capitol, and struggled to meet new people.
I met a lot of people, but all of them were expats, in the same boat as me. After a few years I now have a few local Norwegian friends, but nothing like where I grew up. That said - when you get "accepted" into a group, they'll treat you really nice, and introduce you to a lot of people.
Scandinavians, and especially Norwegians are really reserved to strangers. You'll rarely be talked to in public by a stranger or something like that. It's just a cultural thing.
> I met a lot of people, but all of them were expats
I actually really like this about Copenhagen. You can meet a ton of interesting people, from all over. It's often easier to meet them than in their home countries, too, because you have this being-foreign thing in common. I've met a bunch of Spanish and German people in Copenhagen who I doubt I would've met in Spain and Germany, for example. Compared to other places where that might happen I think it's particularly ideal because there is so much use of English as a lingua-franca in public settings: many events, talks, meetups, university programs, cultural programs, etc. are in English, even when there are few to no native English speakers present, and the crowds they attract are very multicultural (lots of Danes, lots of foreigners from European countries, and a few non-European foreigners). So it's not only these little expat ghettoes like the "Italians in Germany club" that foreigners can go to. Rather, lots of public events are just routinely multinational. For example the monthly meetup of Copenhagen game developers is in English and typically has 10+ nationalities represented.
I assumed Stockholm would be similarly multicultural, but perhaps not?
I'm Swedish and I emigrated first from Sweden to France and then France to the US. I can't speak about going the other way, but having done this twice I think it takes a long time to make _real_ friends with locals almost anywhere if you are past college. Lots of interesting people are busy and have limited time.
If you're a kid or in a primarily social environment like college it's obviously a bit different. I moved both for college and my first job and made tons of friends right away, some of which I still stay in touch with.
Almost every expat I meet has none. There is a wall there. It is unlike any other country. Sorry.