Read only....pick Excel file from IE browser

Results 1 to 2 of 2

Thread: Read only....pick Excel file from IE browser

  1. #1
    Baby Gerl Guest

    Default Read only....pick Excel file from IE browser

    Hi all,<BR><BR>Did any of you know the reason behind this problem?<BR><BR>I have this application which writes to an Excel object and save it to the server. Then allows the user to click on the link in the IE browser and open the Excel file.<BR><BR>It actually pops up an action msgbox which says that someone has already opened the file. Therefore I have the choice to open as read-only, wait for the person to finish(notify) or cancel.<BR><BR>But when I open it from the directory there&#039;s no read-only message. And besides the server under Task Manager dialog...there&#039;s a lot of stucked Excel Object which I cannot get rid of unless I restart the server.<BR><BR>Can anybody help me please? This problem actually started more than a month ago and I&#039;ve anything possible but unsuccessful.<BR>Thanks for your help. I really appreciate it. ;D<BR>My codes look something like this:<BR><BR> Dim xlWorkSheet &#039; Excel Worksheet object<BR> Dim xlApplication <BR> <BR> Set xlApplication = CreateObject("Excel.Application")<BR> xlApplication.Visible = False<BR> xlApplication.Workbooks.Add<BR> Set xlWorksheet = xlApplication.Worksheets(1)<BR>......<BR>......<BR >.....<BR>......<BR>......<BR> If Not rs.EOF Then <BR> Do Until rs.EOF <BR> For i = 0 To rs.fields.Count-3 <BR> xlWorksheet.Cells(iRow,i+1).Value = rs.fields(i+1) <BR> Next <BR> iRow = iRow + 1 <BR> rs.Movenext <BR> Loop <BR> <BR> mthName = getMthName(mth) <BR> strFile = GenFileName(mthName) <BR> <BR> fileName = "excel\" & strFile & ".xls" <BR> xlWorksheet.SaveAs Server.MapPath(".") & fileName <BR>Response.Write("Click &#060;A HRef=" & "excel/" & strFile & ".xls&#062;Here&#060;/A&#062; to get XLS file")<BR> set xlWorksheet = nothing<BR> xlApplication.Quit <BR> &#039; Close the Workbook <BR> Set xlApplication = Nothing <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Read only....pick Excel file from IE browser

    Excel doesn&#039;t actually quit when you tell it to. pull up task manager and you&#039;ll still see a whole bunch of excel processes running. not sure how you&#039;d get around this...<BR><BR>j

Posting Permissions

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