"Bad Variable Type", Excel, W2K

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default "Bad Variable Type", Excel, W2K

    Hi,

    I have an ASP.NET app that works perfectly in Windows Server 2003, but fails
    in Windows 2000.

    It fails when trying to read the data in an Excel Workbook (range.value)...
    The error is:

    COMException (0x80020008): Bad Variable Type

    The app works in Windows Server 2003 !!!

    Why it fails in Windows 2000... Any idea???

    Thanks,
    Alfredo


    Alfredo Magallón Arbizu Guest

  2. Similar Questions and Discussions

    1. Distiller uses Finder creator/type "ORAC"/" FDP"
      Distiller 8/9 running on Intel based mac running OSX 10.4.11/10.5.5. It seems that Distiller creates pdf-files with creator/type "ORAC"/" FDP"....
    2. CFINPUT type="radio" w/ "value" requires "label"
      On a Flash form, when you specify type='radio' and value='whatever', the value of the 'value' attribute will be displayed as a label if no 'label'...
    3. #25366 [NEW]: form buttons of type "image" dont send "submit" $_POST variable in IE
      From: jordanolsommer at imap dot cc Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: Variables related Bug...
    4. convert visual basic "string" data type to DB2 "blob"
      Does anyone know if a visual basic string data type can be converted to DB2 blob datatype? I have all data in XML files and I use Visual Basic to...
    5. rescue the value of a variable type application from a file ".vb"
      Hello: I need to rescue the value of a variable type application from a file ".vb", when making "j = Application("test")" throws an error to me, ...
  3. #2

    Default RE: "Bad Variable Type", Excel, W2K

    Hi Alfredo,

    Generally speaking, the error happens when you have different versions of
    Excel. If you referenced Excel 10.0 (Office XP) type library in windows
    2003 server and then use the same program in a machine with Excel 2000, the
    error happens. So please make sure that the version of Excel is the same.
    If not, please add reference to the right type library in your program.

    Hope this helps.

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided ˇ°as isˇ± with no warranties and confers no rights.

    Tian Min Huang Guest

  4. #3

    Default RE: "Bad Variable Type", Excel, W2K

    Excel is same version (XP SP2) in both servers.

    Regards,
    Alfredo

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Alfredo Magallón Arbizu Guest

  5. #4

    Default RE: "Bad Variable Type", Excel, W2K

    Hello Alfredo,

    I noticed that you also post this issue to another newsgroup
    "microsoft.public.office.developer.vba". One of my colleagues replied there
    and I paste it here for your reference. Please let us know if the following
    information helps you resolve the problem.

    "Alfredo,

    I found a case that describes similar symptoms to those you are seeing.
    Please check the following:

    1) Excel is installed on the Windows 2000 machines. Excel.exe is an
    out-of-process server and has to be installed on the machines on which you
    wish to automatic. The Excel version must match that refernced in your
    program or you will receive interface mismatch errors.
    2) Check that the expression you are building to access the range matches
    the data type expected. In a previous case

    xlSheet.Cells(i + 4, 1).Value = "Test Value" produced the same error
    because i was declared as long and is expected to be integer.

    If this information doesn't fix your problem, please feel free to post the
    following information:

    1) A snipet of the failing code
    2) OS and Excel versions in the various environments
    3) Whetther you are using VB or C#

    Thanks,

    Jim

    Jim Vita
    Microsoft Developer Support

    This posting is provided "AS IS" with no warranties, and confers no rights."

    We are looking forward to your result!

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided ˇ°as isˇ± with no warranties and confers no rights.


    Tian Min Huang Guest

  6. #5

    Default Re: "Bad Variable Type", Excel, W2K

    I changed range access variables from long to integer, and it works now !!!

    Anyway, I consider this a very limiting issue and a bug to be corrected, as
    it is if I use Windows Server 2003.

    Many thanks for your help!!!

    Alfredo

    "Tian Min Huang" <timhuang@online.microsoft.com> wrote in message
    news:R24BBamVDHA.2228@cpmsftngxa06.phx.gbl...
    > Hello Alfredo,
    >
    > I noticed that you also post this issue to another newsgroup
    > "microsoft.public.office.developer.vba". One of my colleagues replied
    there
    > and I paste it here for your reference. Please let us know if the
    following
    > information helps you resolve the problem.
    >
    > "Alfredo,
    >
    > I found a case that describes similar symptoms to those you are seeing.
    > Please check the following:
    >
    > 1) Excel is installed on the Windows 2000 machines. Excel.exe is an
    > out-of-process server and has to be installed on the machines on which you
    > wish to automatic. The Excel version must match that refernced in your
    > program or you will receive interface mismatch errors.
    > 2) Check that the expression you are building to access the range matches
    > the data type expected. In a previous case
    >
    > xlSheet.Cells(i + 4, 1).Value = "Test Value" produced the same error
    > because i was declared as long and is expected to be integer.
    >
    > If this information doesn't fix your problem, please feel free to post the
    > following information:
    >
    > 1) A snipet of the failing code
    > 2) OS and Excel versions in the various environments
    > 3) Whetther you are using VB or C#
    >
    > Thanks,
    >
    > Jim
    >
    > Jim Vita
    > Microsoft Developer Support
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    rights."
    >
    > We are looking forward to your result!
    >
    > Regards,
    >
    > HuangTM
    > Microsoft Online Partner Support
    > MCSE/MCSD
    >
    > Get Secure! ¨C [url]www.microsoft.com/security[/url]
    > This posting is provided ˇ°as isˇ± with no warranties and confers no
    rights.
    >
    >

    Alfredo Magallón Arbizu Guest

  7. #6

    Default Re: "Bad Variable Type", Excel, W2K

    Hello Alfredo,

    Thanks a lot for your update. I am very glad to hear that it works. In
    addition, I believe the following KB article is very helpful:

    INFO: Considerations for Server-Side Automation of Office
    [url]http://support.microsoft.com/?id=257757[/url]

    Have a nice day!

    Regards,

    HuangTM
    Microsoft Online Partner Support
    MCSE/MCSD

    Get Secure! ¨C [url]www.microsoft.com/security[/url]
    This posting is provided ˇ°as isˇ± with no warranties and confers no rights.


    Tian Min Huang Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139