# Loop a viewstack

**URL:** https://forum.kirupa.com/t/loop-a-viewstack/291137
**Category:** flash
**Created:** [June 25, 2009, 3:58am UTC](https://forum.kirupa.com/t/loop-a-viewstack/291137 "2009-06-25T03:58:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nurulizrin](https://avatars.discourse-cdn.com/v4/letter/n/3ab097/32.png) [@nurulizrin](https://forum.kirupa.com/u/nurulizrin)
#### Post date: [June 25, 2009, 3:58am UTC](https://forum.kirupa.com/t/loop-a-viewstack/291137/1 "2009-06-25T03:58:08Z")

</div>

hi,  
Flex newbie here, stuck on what should be a simple task.

My application consists of a viewStack of 10 panels. Each panel have a datagrid. I would like to print all 10 datagrids content in Excel file.  
My problem is, I don’t know how to loop a datagrid in order to have all printed in Excel.  
Currently it only print one datagrid(by using viewstack - selected index).  
Please help…:sen:

thanks in advance.
