Hello, I was wondering if you could offer some more advise on the best method for adding multiple sheets (1 sheet per user) from a query table of users.
I am not using the FlexCelReports, i am using the API. so the multiple sheets example demo doesn't work for me.
The steps I currently take are
1. manually select a user by id number from users table.
2. Run a query to get data from time table based on the manually selected user
3. Loop through each row and extract the data, manipulate and then place into FlexCellImport / grid.
so my question is what is the best way to do the above steps but have my application process all users automatically creating a separate sheet fro each?
------------
If my excel files first sheet has my layout, how would I create more sheets each with a duplicate layout ?
I tried to do this but I either create a second sheet which is blank or I copy the entire first sheet but it also copies all the populated data too rather than a blank template ready to populate with my second users data.
--------------
Also what's the best method of clearing just my populated data from a FlexCelImport / FlexCelGrid but not clearing my preloaded template layout? the way I currently do it is to reload the entire template file, but is there a better way?
FlexCelImport doesn't know about users or templates, it is just a big array of cells and sheets. So you would need to call FlexCelImport.InsertAndCopySheets before you fill in the data, after you have filled it in if you copy the sheets you will copy all populated data. Something like:
About the second question, the same answer. Once you have populated the data, FlexCelImport has an array with all the data, it doesn't know which data comes from a template, and which data was populated by you. You will have to reload the template. If you want, you might open it from a memorystream instead of a file, it might be a little faster, but I am not sure it will matter.