What is wrong....

Results 1 to 4 of 4

Thread: What is wrong....

  1. #1
    Sujata Guest

    Default What is wrong....

    Not able to understand what is wrong<BR>I want to open .xls file but....<BR><BR>Dim oXL, val<BR>Set oXL=Server.GetObject("C: est.xls")<BR>oXL.Sheets("Sheet1").Cells(3,2).Value =val<BR><BR>I am getting error<BR><BR>Microsoft VBScript runtime error &#039 800a01b6&#039 <BR><BR>Object doesn&#039t support this property or method: &#039GetObject&#039 <BR><BR>what changes are requried in code.<BR><BR>Thanks,<BR>Sujata<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: What is wrong....

    Try as<BR><BR>Set oXL=Server.CreateObject("Excel.Application")<BR> <BR> <BR>

  3. #3
    Sujata Guest

    Default RE: What is wrong....

    Thank you Sreenivas.<BR><BR>That code is working.<BR><BR>Set objXL = CreateObject("Excel.Application")<BR><BR>objXL.Wor kbooks.Add <BR>objXL.Range("A1:d1").Select<BR>objXL.Selection .Font.Bold = True<BR>objXL.Columns(1).ColumnWidth = 20<BR>objXL.Columns(2).ColumnWidth = 40<BR>objXL.Columns(3).ColumnWidth = 20<BR>objXL.Columns(4).ColumnWidth = 25<BR>objXL.Cells(1,1).Value = "Name"<BR>objXL.Cells(1,2).Value = "Address"<BR>objXL.Cells(1,3).Value = "City"<BR>objXL.Cells(1,4).Value = "Zip"<BR>objXL.Visible = True<BR><BR>for this i am facing problem. <BR>1.<BR> it is running locally prefect.<BR> but not working on server. That&#039s why i am tring<BR> "Getobject".<BR>2. i am not able to add sheet to same same .xls.<BR> if i use objXL.Workbooks.Add <BR> it is opening one more instance.<BR><BR>Any suggestion?<BR><BR>Sujata.

  4. #4
    Sujata Guest

    Default answer & one more ?....

    I added visible property=true <BR><BR>It is working but not loading file.<BR><BR>If I do same with .doc it is loading document also.<BR><BR>&#060;%<BR>Set obj = GetObject("c:aa.doc")<BR>obj.Application.Visible = True%&#062;<BR><BR>Thanks,<BR>Sujata

Posting Permissions

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