VBA compare throwing "Conversion error"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • emelie
    Journeyman
    • Jan 2012
    • 11

    VBA compare throwing "Conversion error"

    I'm running a portable installation of BC3 (just downloaded) and want to compare several Excel 2010 XLSM files.
    Thus I downloaded the additional file format "Microsoft Excel workbooks VBA" from this page.

    After loading the first file I'm presented with a "Conversion Error" and I don't know how to debug this.

    Does anybody have experience with this specific converter?

    EDIT
    Solution: XLSM VBA comparison does not work with a portable installation. Choose the regular installation and it will work just fine.
    Last edited by emelie; 13-Feb-2012, 09:21 AM. Reason: Added solution i
  • Chris
    Team Scooter
    • Oct 2007
    • 5538

    #2
    Does your system have Microsoft Excel installed? The add-on requires Excel, so if it's not installed it won't work.

    If you do have Excel installed on your system, what version of Excel do you have?
    Chris K Scooter Software

    Comment

    • emelie
      Journeyman
      • Jan 2012
      • 11

      #3
      Excel 2010 64bit is installed on my system.

      Comment

      • emelie
        Journeyman
        • Jan 2012
        • 11

        #4
        I'll answer myself this time
        Just tried this on another machine - the only difference being that the installation was not portable but regular.
        Now it worked.

        So, everybody else stumbling on this: XLSM VBA comparison does not work with a portable installation.

        Comment

        • Aaron
          Team Scooter
          • Oct 2007
          • 16000

          #5
          Hello,

          A portable install should be able to support the external conversion. We did a quick test here in the office and it seemed to work fine. I would guess one of two things:

          1) The portable install was in a location where the .vba script had security or permissions preventing it from running.

          2) The portable install was in a specific location so that the basic "Helpers\file.vba" file path definition was not sufficient to properly define it. To help fix this scenario, instead of using a simple relative path, please try changing it to an absolute path with "quotes" surrounding it. The path is defined in the Tools menu -> File Formats, select the specific format, Conversion tab, in the External Conversion command line.
          Aaron P Scooter Software

          Comment

          • emelie
            Journeyman
            • Jan 2012
            • 11

            #6
            Hey Aaron,

            I'm running into this error again.
            This time I tried following your advice:
            - the location of the script is within the application folder (c\program files\beyond compare\helpers) where the installer put it; so I guess there shouldn't be a permissions problem
            - I adjusted the path to an absolute one like you recommended

            Both things don't work and I still get "conversion error". Is there any way to debug this further? Log files..?

            Thanks!

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16000

              #7
              Running a vba script is generally built-in functionality in Windows. Subsequently, some aggressive antivirus programs may try to block script from running.

              Are you comfortable running the script call directly from the command line? The Helpers directory and helper files are called from a simple command line call. You can find this command line in the Tools menu -> File Formats dialog, in the specific Excel format, in the Conversion tab.

              %s represents the source .xls file
              % represents the target .txt file

              Are you able to call the vba script from the command line, given a source excel and target .txt file? Does the command line have any extra errors present, or does the conversion work?
              Aaron P Scooter Software

              Comment

              • emelie
                Journeyman
                • Jan 2012
                • 11

                #8
                Hey Aaron, I already tried running the script from the command line.
                There is no additional error output and the target file isn't created.
                My current status is that the if-condition is never true because Err = 1004 after the workbook is opened in line 26.
                Maybe this has something to do with Windows 7 64bit / Office 2010 32bit?
                Just guessing here but I'm really at a loss - a couple of weeks ago this worked beautifully.

                Well I'm going to dig through this again later this week - will post further results then.

                Comment

                • emelie
                  Journeyman
                  • Jan 2012
                  • 11

                  #9
                  Some more results:
                  After realizing that the script expects absolute full path + filename as parameters the target file gets created but it is empty.

                  Comment

                  • pml
                    New User
                    • May 2012
                    • 2

                    #10
                    Same problem

                    Hi, I just tried this today using the same setup, except i'm using the standard version of beyond compare and excel 2010 64-bit.

                    Getting a conversion error too. I tried lowering the security of macros but this didn't work either.

                    Comment

                    • pml
                      New User
                      • May 2012
                      • 2

                      #11
                      I'm having the same problem using the regular version of beyond compare and excel 2010 64-bit.

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 16000

                        #12
                        Hello emelie,

                        Would you be able to send in a pair of sample files into [email protected] ? Please include a link to this forum thread and your BCSupport.zip (Help menu -> Support; Export).

                        To clarify, you are seeing the empty file created on the command line? Are you able to open your file in Excel and perform a Save As into a text based format?
                        Aaron P Scooter Software

                        Comment

                        • Aaron
                          Team Scooter
                          • Oct 2007
                          • 16000

                          #13
                          Hello pml,

                          Similarly, have you had a chance to try the conversion from the command line? If you are still having trouble, please email us at [email protected] :
                          1) BCsupport.zip (Help menu -> Support; Export)
                          2) Pair of sample files
                          Aaron P Scooter Software

                          Comment

                          • emelie
                            Journeyman
                            • Jan 2012
                            • 11

                            #14
                            Hey Aaron,

                            is there any update to this issue?
                            We already exchanged mails about this. Were my samples helpful in finding out what's wrong?

                            Thanks very much - I appreciate your help!

                            Comment

                            • Aaron
                              Team Scooter
                              • Oct 2007
                              • 16000

                              #15
                              Hello Emelie,

                              Searching through our email records, I found our email conversation but it does not include sample files. Instead, it looks like when you tried a normal installation of BC3 the conversion began to work for you.

                              I had a few theories about this I mentioned in an email, such as the Portable Install's path may have been too long, in a location that does not allow vb script, or that trying an absolute path might help. Did you ever get a chance to try a Portable Install to your user's Desktop to see if that would work?

                              "External Conversion Error" is a generic error message that can be caused by a large variety of factors. The best test is to run the external conversion (as defined in the File Format's Conversion tab) from the command line, given a sample file and text output. This conversion must work from the command line in order for it to work in Beyond Compare 3.
                              Aaron P Scooter Software

                              Comment

                              Working...