8 Replies Latest reply: May 15, 2014 9:57 AM by Tom Strachan RSS

    Project Export in batch file

    Alejandro Guerrero

      Someone could help me ?


      I have V7.02 pro.


      I Have a project that process one report and one external lookup.


      Then I have 17 summaries definitions.


      I have 2 projects exports.


      The first create a excel file with one detail records sheet (6011 records)


      The second add data to the same excel file creating 17 summaries sheet.


      When I run it in manual mode (interactive) and export all definitions in project exports,

      all run perfect.


      I have the excel file with one detail sheet

      and 17 summaries sheet with all records.


      The problem is when I want include this project in one batch file (*.bat) for automatic processing with this syntaxis :



      "c:Program FilesMonarchProgramMonarch.exe" /prj:"C:Program FilesMonarchProjects11996_stock_listing.prj"




      Then the excel file is ok with  one detail sheet and with 17 summaries sheet, but in the sumaries sheet I have only few recods, not all.


      I dont know what happend.


      please help me.

        • Project Export in batch file
          Grant Perkins



          Using a Project and /pxall should work OK.


          Is there a pattern of what is missing?


          Is there any possiblity that there may be a filter applied for example?


          I think I would also make sure that the Microsoft JetExport application is up to date - there is a link to the MS update pages in one of the posts if you  search on JetExport.


          You could also try a change to the batch file and use repeated /px:[Export Name]     entries instead of /pxall to see if that makes a difference to running from the project. It may help with the diagnosis.


          Are you using exactly the same dats with exactly the same expected results for both manual exports and project exports?


          Sorry I have not given a definitive answer but maybe these ideas will suggest something that will help you to identify the cause.


          Good luck.



          • Project Export in batch file
            Mike Urbonas



            Is there any chance that you have any NULL values in your Monarch Table?  If there are NULL values in the Table, they will mess up the values in the Summary.  Monarch can't automatically ignore NULL values or automatically treat them as zero.


            You may have to do a calculated field to get Monarch to change NULL values into zeroes - something like this:




            and then use this calculated field in your summary.  Then the summary should work.


            Let me know if this was the problem.  Good luck,



            • Project Export in batch file
              Alejandro Guerrero

              Hi Mike, Congratulations !. have read de news for V8.  I think it`s  wonderfull.


              I hope this new version resolve my problem. Please tell me that.


              Thanks for your comments.


              Hi Grant,  thanks for your ideas. I really probe all them. 


              Finally, I know what is the problem.


              I say again:


              I have a batch file with various projects.


              When run each project interactive, it run perfect.


              When run in batch, the data are erroneous.


              The problem is when I have an external lookup inside the project.


              THAT DONT RUN IN BATCH. !!!!!


              I change it by a  new calculated field lookup.


              Then they run perfect.


              Please If You can correct this, tell me.


              Its very important for me that.


              I have 3 or 4 master catalog, that I use in 30 projects. Then  I must to change all projects when the data change.


              The best way is to have the master catalog and use them with an external lookup.


              I hope You can help me soon.



              • Project Export in batch file
                Bruce _



                I use version 7 all the time to do exports to Excel & Access. Each night there are over 80 different exports & they run without problems, so I do not think version 7 is the problem.


                If you run the "run all" from the project exports tab, everything runs OK? Check this before assuming the batch file is messing you up.


                Is it possible the 2nd (and 3rd, 4th..) exports are over writing the 1st export? This is what I suspect is happening in your case. There are two tabs to check this at the file level and the table level in the export wizard.


                Version 8 is great, but I do not think this is the problem here, as the export did not change in version 8.




                [size="1"][ March 29, 2005, 10:04 PM: Message edited by: Bruce Reed ][/size]

                • Project Export in batch file
                  Alejandro Guerrero

                  Hi Bruce,


                  I´m sure that the problem in my case is with the external lookup when I want to read a excel file in batch.


                  I changed it by a calculated field lookup and all is OK.


                  Could You tell me if in your projects exports do you have an external lookup ?



                  • Project Export in batch file
                    Gareth Horton



                    We have not been able to reproduce your problem here with 7.01 or 8.00. 


                    It may be something specific to the combination of factors in your model and project that is causing the problem.


                    As an additional thing to try -


                    Go back to using the external lookup, but create a new calculated field for each of the fields from your external lookup, just using the name of the field as the expression. Essentially you are just creating a copy of all your external lookup fields as calculated fields. Then use these calculated fields in the summary and see if the problem still occurs.


                    I think the only way to solve this problem is by having a reprt, model and external lookup file that we can reproduce the problem with.


                    If the data is sensitive, then try and reproduce the problem using the monarch sample files.


                    Let me know if you are able to send some files that reproduce the problem and I can make arrangements for receiving them.




                    Originally posted by Alejandro Guerrero:

                    Hi Bruce,


                    I´m sure that the problem in my case is with the external lookup when I want to read a excel file in batch.


                    I changed it by a calculated field lookup and all is OK.


                    Could You tell me if in your projects exports do you have an external lookup ?


                    Thanks. /b[/quote]

                    • Project Export in batch file
                      Bruce _



                      Yes I use several (8) Excel external links, as well as a few internal table lookups. Gareth's suggestion is the best idea, can you send him your files?

                      • Project Export in batch file
                        Tom Strachan



                        I could be misguiding you, but here's a thought - perhaps the batch is executing too quickly.



                        I've experienced a problem where batches that have multiple processing steps don't fire sequentially, they run concurrently and that can cause unexpected problems.


                        I would suggest something similar to a previous post - export your data once piece at a time instead of using the /all option.  That way you can eliminate that problem.


                        Kind regards