#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    58
    Rep Power
    11

    Generated CSV File 'Locked for Editing' (IE Only)


    My script is generating a simple CSV file (relevant code below). Everything works great in Firefox. When the script is run in the browser, it automatically generates the CSV and allows user to Open directly in to Excel.

    In IE, when opening the CSV file, the user is greeted with this error message:

    busCards.csv is locked for editing by 'another user.'
    The client will be using IE so I'm trying to figure out how to fix this. Anybody have any ideas? Much appreciated!!

    Code:
    <% 
    response.ContentType="application/octet-stream" Response.AddHeader "content-disposition","attachment; filename=busCards.csv" 
    Dim Spreadsheet 
    Spreadsheet = Request.Form("csv_text") 
    Response.write Spreadsheet 
    Response.End() 
    %>
    Last edited by mapenn; May 6th, 2011 at 02:11 PM.
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Whatever is going wrong is going wrong on the browser. Your code snip merely echoes back whatever was in the form field csv_text in the browser. Apparently something is not closing a file on the client computer properly.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2004
    Posts
    58
    Rep Power
    11
    Originally Posted by Doug G
    Whatever is going wrong is going wrong on the browser. Your code snip merely echoes back whatever was in the form field csv_text in the browser. Apparently something is not closing a file on the client computer properly.
    Yes, this is strange. I tested on a few other PCs over the weekend. They all experience the same problem -- but only when using IE. I'm stuck on this one!

IMN logo majestic logo threadwatch logo seochat tools logo