5 Replies Latest reply: May 15, 2014 10:03 AM by Data Kruncher RSS

    Project Export - producing a table for each filter

    Scott Eshleman

      I searched the forum but couldn't find a similar issue posted for this Version 10 feature. 

      I'm trying to export a Monarch table to Excel.

      I want to "Export the table data as filtered by each of the available filters, producing a table for each filter."

      /LISTHowever, upon running the Project Export, the order of tables in the Excel file created do not match any discernible pattern.  My preference is that the tab order of the tables match the order of the filters in the project.

        • Project Export - producing a table for each filter
          Data Kruncher

          Hi Scott,

           

          I'm not able to test your scenario just now, but I'm not sure that I'd get an improved result anyway.

           

          You can definitely get the results you want, but to get there I believe will necessitate a little custom programming. Not much, I promise. Are you up for the challenge?

           

          If you don't have it already, you'll need the [URL="http://www.datawatch.com/_support/downloads_updates.php"]Monarch Programmer's Guide[/URL]. If you're new to programming and find that document to be a bit too techie, you might want to consider my [URL="http://********************/tips/monarch-programming-class"]Monarch programming tool[/URL] which (hopefully) uses simpler language and plenty of examples to help you accomplish the task.

           

          Finally, I suspect that you'll need to look at the FilterCount and GetFilterNameAt keywords.

           

          This would be a nice little project with which to become a bit accustomed with programming Monarch, and might help some of your other work.

           

          Good luck with whichever solution you choose.

           

          Oh, and if another forum member is aware of how to accomplishing this task without programming, feel free to invalidate my idea.

            • Project Export - producing a table for each filter
              Scott Eshleman

              I'm always up for a challenge, but cannot always dictate the priority or order in which they get my attention. 

               

              I have both of your tools and have only had opportunity to use the batch creator.  Looks like I've got an overriding reason to explore the other tool now, too.  I just wasn't sure if I had missed something in Monarch or my configuration. 

               

              PS:  I highly recommend the tools and your blog to anyone still not acquainted with them.

                • Project Export - producing a table for each filter
                  Data Kruncher

                  I was pretty sure that I'd sent the file to you, but wasn't able to verify it.

                   

                  Thanks for your support Scott. I really appreciate it. :cool:

                    • Project Export - producing a table for each filter
                      Nick Osdale-Popa

                      Well, just as a technical aspect, the "discernible order" of the filtes is based on how they are listed in the .xmod file (which is nothing more than an xml file).

                       

                      I had these filters in a model:

                      Current Debits

                      Debits

                      Period

                       

                      I did a project export of all filters and they exported in this order:

                      Current Debits

                      Period

                      Debits

                       

                      I then made a filter called Future, but that export had them in this order

                      Current Debits

                      Period

                      Future

                      Debits

                       

                      In the .xmod file it shows:

                      -

                      /code

                       

                      Now granted, how that order is based is still indiscernible. That's something Gareth will need to answer.

                        • Project Export - producing a table for each filter
                          Data Kruncher

                          This is too funny. I just spent about 15 minutes testing this situation as I've had it on my mind, and had some time while waiting for another process to complete. And you beat me to it by minutes.

                           

                          Anyway, the long and the short of it is that I arrived at the same conclusion, adding and deleting filters and then looking at the resultant XML.

                           

                          There's no clear pattern to how the filters are sequenced in the file, but the XML file sequence is definitely what dictates the export sequence. Perhaps an alpha sort, similar to the filter list dialog, is in order when exporting based on filter names?