Topic
10 replies Latest Post - ‏2012-11-20T17:50:02Z by SystemAdmin
Phill_Rowbottom
Phill_Rowbottom
4 Posts
ACCEPTED ANSWER

Pinned topic nmon analyser in Excel for Mac 2011

‏2012-02-20T19:43:27Z |
Hi,

Has anyone had any success in getting the analyser to run in Excel for Mac 2011? All the information on excel for mac 2011 tells me that it supports the same VBA environment as the windows version.

When I try and run the analyser in Excel for Mac 2011 it produces a Microsoft Forms error "Could not load an object because it is not available on this machine". When trying to compile the macro in Excel it stops on a "method or data member not found" error at "UserForm1.ProgressBar1.Value = 0". This is my first attempt at looking at VBA code in Excel so just wondering if anyone has any ideas on this?

It would be rather nice if the analyser could run on Excel for Mac.

Phill.
Updated on 2012-11-20T17:50:02Z at 2012-11-20T17:50:02Z by SystemAdmin
  • nagger
    nagger
    1594 Posts
    ACCEPTED ANSWER

    I think you are on your own

    ‏2012-03-06T16:21:17Z  in response to Phill_Rowbottom
    Hi,
    I think you might be the only person attempting this combination.
    You are fighting the Microsoft is not compatible with Microsoft and Apple does it differently problems.

    Unless you feel like funding an Apple Mac for Stephen Atkins and Excel SW too? :-)

    Best of luck and let us know if you get this combo working.

    Thanks Nigel
    • BruceSpencer
      BruceSpencer
      290 Posts
      ACCEPTED ANSWER

      Re: I think you are on your own

      ‏2012-03-06T19:44:37Z  in response to nagger
      I just did a Google search. The results indicate the ProgressBar is not supported on Mac Excel (item #2).

      link:http://sysmod.wordpress.com/2011/10/28/mac-excel-vs-pc-excel/

      The ProgressBar is not essential to the NMON Analyzer. It's just a visual indication of the progress of the nmon import. If you're VBA knowledgeable, you can safely comment out all lines containing "ProgressBar" using the macro editor.

      You won't be able to see the progress, but it "should" work.
      • SystemAdmin
        SystemAdmin
        2404 Posts
        ACCEPTED ANSWER

        Re: I think you are on your own

        ‏2012-03-06T20:11:33Z  in response to BruceSpencer
        The main issues are actually with the fact that I use Windows APIs in (at least) two places. The first is the dialog to get the list of files and the second is to invoke the SORT command for files >65K lines. The first should be relatively simple to code around. The second is probably quite tricky and you might just be advised to ignore large files.
        • Phill_Rowbottom
          Phill_Rowbottom
          4 Posts
          ACCEPTED ANSWER

          Re: I think you are on your own

          ‏2012-03-12T22:35:55Z  in response to SystemAdmin
          yes.....so much for some of the Excel for Mac sites saying that Excel for Mac 2011 implements the same VBA as the windows version..!!

          I did go some searching around and find some progress bar examples that do with with Excel Mac 2011. The code looks quite different to that which is used in nmon_analyser though.

          The sort wouldn't be a bit issue as OS X is BSD based and has the Unix sort command, so just a matter of changing it to use that one. The file opening dialog might be a different story though but you would think that Excel 2011 would be able to deal with opening a file.....something to have a bit more of a dig through if/when I do get a chance....and thumble my way through some VBA.
    • SystemAdmin
      SystemAdmin
      2404 Posts
      ACCEPTED ANSWER

      Re: I think you are on your own

      ‏2012-11-20T17:01:12Z  in response to nagger
      Hi,
      Just wanted to put my $0.02 in here.

      I also use a Mac primarily at work, and it would be great to have a way to generate these reports without logging into a Windows machine.

      Thanks for your time,

      Scott
      • SystemAdmin
        SystemAdmin
        2404 Posts
        ACCEPTED ANSWER

        Re: I think you are on your own

        ‏2012-11-20T17:49:22Z  in response to SystemAdmin
        Phil, Burr & Scott,
        What you are thinking of is offcource possbile, the only contraint might be the amount of efforts it involves in reinventing it in totality.

        What you can do for yourself is you can quickly work a shell script to pull the data of your interest (CPU, MEM etc.) out of .nmon file and draw a chart out of that, even this chart creation effort can be minimised using perl for creating spreadsheet charts that are even compatiable with open office !

        Silver lining at the end.......
        Lokesh
      • SystemAdmin
        SystemAdmin
        2404 Posts
        ACCEPTED ANSWER

        Re: God help them who help themselves !

        ‏2012-11-20T17:50:02Z  in response to SystemAdmin
        Phil, Burr & Scott,
        What you are thinking of is offcource possbile, the only contraint might be the amount of efforts it involves in reinventing it in totality.

        What you can do for yourself is you can quickly work a shell script to pull the data of your interest (CPU, MEM etc.) out of .nmon file and draw a chart out of that, even this chart creation effort can be minimised using perl for creating spreadsheet charts that are even compatiable with open office !

        Silver lining at the end.......
        Lokesh
  • Phill_Rowbottom
    Phill_Rowbottom
    4 Posts
    ACCEPTED ANSWER

    Re: nmon analyser in Excel for Mac 2011

    ‏2012-03-12T22:56:29Z  in response to Phill_Rowbottom
    I thought that I'd try the modified for 64bit version that Abdelkarim MEHIAOUI has produced. It boomed out on the kernel32 calls:-

    Public Declare PtrSafe Function OpenProcess Lib "kernel32" ( _
    ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, _
    ByVal dwProcessId As Long) As Long
    Public Declare PtrSafe Function WaitForSingleObject Lib "kernel32" ( _
    ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
    Public Declare PtrSafe Function CloseHandle Lib "kernel32" ( _
    ByVal hObject As Long) As Long

    Which would be your windows specific stuff :)

    Phill.
    • Phill_Rowbottom
      Phill_Rowbottom
      4 Posts
      ACCEPTED ANSWER

      Re: nmon analyser in Excel for Mac 2011

      ‏2012-03-12T23:00:00Z  in response to Phill_Rowbottom
      Looking at the code in the 64bit version....the progress bar calls have been commented out.
      • Bur_P
        Bur_P
        1 Post
        ACCEPTED ANSWER

        Re: nmon analyser in Excel for Mac 2011

        ‏2012-10-09T12:32:33Z  in response to Phill_Rowbottom
        Hi Phill,

        Did you ever managed to get this right?

        I'm in the same boat where I need to analyse the NMon results on a Mac.

        How difficult would it be do re-write the (VB) macro for Open/Libre Office. That should work on any machine (with java).

        Regards

        Paul