Sprite created with spriteSheet repeat (GL_REPEAT) problem

If I create sprite like this the texure is correctly repeated in direction i want:

auto spr = Sprite::create("file.png"); 
Texture2D::TexParams tp = { GL_LINEAR, GL_LINEAR, GL_REPEAT, GL_LINEAR };
spr ->getTexture()->setTexParameters(tp);

However if I use spritesheet it repeats whole spritesheet instead one frame from spritesheet

auto spr = Sprite::createWithSpriteFrameName("file.png")

How can I force it to use only part of texture?

It seems you have to render your sprite from the atlas to your texture and use that.

From another thread(obj-c; cocos2d), but I guess you are able to derive it into C++ and cocos2d-x:

Basically if you want to do this you need to use a standard CCSprite as you described.

http://forum.cocos2d-swift.org/t/repeating-a-texture-using-batchnode/10923

Why so complex? It will be easier and faster to store this texture separately from the begining.

Caused the OP asked for doing it with the atlas, not a redundant texture stored on disk.

Easier: maybe, but the code to render out the texture from the atlas is not that complicated, is it?
Faster: well, not really. It might be even slower or at least on par. You are introducing disk i/o instead of doing a memory read from the atlas and disk i/o is rather slow compared to memory i/o. Creating the texture/sprite from the atlas or creating a sprite from the disk stored texture after it is in memory is basically doing the same code under the hood.
Additionally it introducing redundancy, just for having a more convenient/easier way.