How can I spawn multiple items into a chest, using Command Blocks?

So I know how to do /replaceitem but is it possible to do the command but instead of only doing one slot but multiple or even slot.container.x, x being that slot and continuing to the next slot?
Best Answer
NOTE: I know that It may be late, and an answer is shown, but I figured i'd give an updated version with 1.8 just in case some people don't know it yet.
You can use the /clone command to clone a chest with the items you want to include to another location.
You'd set up your chest template but placing a chest somewhere (Preferably hidden) and place all the items you want in it. Make sure the chest is facing the same direction as the chest you want filled up.
Then you'd use this command, or put it in a command block:
/clone <x1> <y1> <z1> <x2> <y2> <z2> <x> <y> <z>
In your case the x1 and x2 would be the same, y1 and y2 would be the same, and z1 and z2 would be the same.
The x1 y1 z1 would be the coordinates of your chest, and the x y z would be the coordinates of the chest you want filled up.
There! Now whenever somebody activates the command block, the template chest should clone to the real chest, filling it up! You may put as many items in the template chest as you please, and is, in my opinion, a much easier way to do it!
Pictures about "How can I spawn multiple items into a chest, using Command Blocks?"



How do you put multiple items in one command block?
If want to give multiple blocks at once, you need to specify an Amount in the /give command. The amount goes after the Item that you are giving. Type the command in the chat window and press the Enter key to run the command.How do you make items spawn in a chest in Minecraft?
To make your command block run multiple commands, you will need to summon FallingSand or falling_block (depending on your version of Minecraft) with command blocks and redstone blocks for each command. The command blocks will be stacked one on top of the other and contain the individual command.Item Generators with Command Blocks (TUTORIAL) - MCPE/Win10/Xbox/Switch
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Anete Lusina, Anete Lusina, Sora Shimazaki, Anete Lusina