You are browsing ASP Forum.

Microsoft Excel error message '800a03ec'

esoone. I've SQL Server with several web sites (database driven). I've a download function which works just fine on one of the web sites (the original). I've identicald the database and Created a second web site with all of the same functionaly except for the DB Connect. I am using the same exact code snippet for both however on the site that I wana to work I get the following error message:Microsoft Excelerror message '800a03ec'
Microsoft Excel can't access the file 'D: Websites Forms'. There are several possible reasons: The file name or path name does not exist. The file you're trying to open is being used by another Program. Close the document in the other program, and try again. The name of the workbook you're trying to save is the same as the name of another document that is read-only. Try saving the workbook with a various name.
DLAttendees.asp, line 121
The path is definitely there and is the same path on the other site. Does anybody have any suggestions I will copy the asp file that I am using to perform this download function given below (the orignal page redirects passing the ID numbers).
I applicationlaud any suggestions that you may have.
= )
CS Dim objConn, objRS, objExcel, I, strStatus, strFileName, agntLastname, agntMeetingDate
Dim strYear, strMonth, strDay, fs
Set objConn = Server.CreateObject("ADODB.Connection")
Set objRS = Server.CreateObject("ADODB.Recordset")
objConn.Open strDBConnect
strSQL = "Select Lastname From Users Where ID = " & agntUserID
objRS.Open strSQL, objConn, 0
agntLastname = ""
If Not objRS.EOF Then
agntLastname = objRS("Lastname")
End If
strSQL = "Select DateOfMeeting From SeminarDetails Where ID = " & agntMeetingID
objRS.Open strSQL, objConn, 0
agntMeetingDate = ""
If Not objRS.EOF Then
If Not IsNull(objRS("DateOfMeeting")) Then
strYear = Year(objRS("DateOfMeeting")) & "-"
strMonth = Month(objRS("DateOfMeeting")) & "-"
strDay = Day(objRS("DateOfMeeting"))
agntMeetingDate = strYear & strMonth & strDay
End If
End If
If Len(Trim(agntLastname)) > 0 Then
strFilename = Trim(agntLastname)
strFilename = "Attendees"
End If
If Len(Trim(agntMeetingDate)) > 0 Then
strFilename = strFilename & "-" & agntMeetingDate & ".xls"
End If
strSQL = "Select A.ID, IDCode, SC.Code as Status, DateRegistered, Title, Lastname, Firstname, MiddleInitial, Sufresolve, "
strSQL = strSQL & "phone, Address, City, ST.Abbreviation as State, Zip, Age, Income, HomeValue, Cancelled "
strSQL = strSQL & "From Attendees A, StateCodes ST, AttendeeStatusCodes SC "
strSQL = strSQL & "Where A.State *= ST.ID "
strSQL = strSQL & " And A.Status *= SC.ID "
strSQL = strSQL & " And MeetingID = " & agntMeetingID
strSQL = strSQL & " And Status > 1 "
strSQL = strSQL & "Order By A.Status, DateRegistered, IDCode "
objRS.Open strSQL, objConn, 0
If objRS.EOF Then
Set objRS = Nothing
Set objConn = Nothing
Response.Write("Nothing to download. Please use your browser's BACK button to return.")
Set objExcel = Server.CreateObject("Excel.Sheet")
objExcel.Application.Visible = False
objExcel.ActiveSheet.Cells(1, 1).Value = "ID"
objExcel.ActiveSheet.Cells(1, 2).Value = "STATUS"
objExcel.ActiveSheet.Cells(1, 3).Value = "DATEREGISTERED"
objExcel.ActiveSheet.Cells(1, 4).Value = "TITLE"
objExcel.ActiveSheet.Cells(1, 5).Value = "FIRSTNAME"
objExcel.ActiveSheet.Cells(1, 6).Value = "MI"
objExcel.ActiveSheet.Cells(1, 7).Value = "LASTNAME"
objExcel.ActiveSheet.Cells(1, 8).Value = "LNSUFFIX"
objExcel.ActiveSheet.Cells(1, 9).Value = "ADDRESS"
objExcel.ActiveSheet.Cells(1,10).Value = "CITY"
objExcel.ActiveSheet.Cells(1,11).Value = "STATE"
objExcel.ActiveSheet.Cells(1,12).Value = "ZIPCODE"
objExcel.ActiveSheet.Cells(1,13).Value = "AGE"
objExcel.ActiveSheet.Cells(1,14).Value = "INCOME"
objExcel.ActiveSheet.Cells(1,15).Value = "HOMEVALUE"
objExcel.ActiveSheet.Cells(1,16).Value = "phone"

I = 0
Do While Not objRS.EOF
I = I + 1
objExcel.ActiveSheet.Cells(I+1, 1).Value = Iif(IsNull(objRS("IDCode")) Or (Len(Trim(objRS("IDCode"))) = 0), objRS("ID"), objRS("IDCode"))
objExcel.ActiveSheet.Cells(I+1, 2).Value = Iif(objRS("Cancelled") <> 0, "Cancelled", objRS("Status"))
objExcel.ActiveSheet.Cells(I+1, 3).Value = "'" & objRS("DateRegistered")
objExcel.ActiveSheet.Cells(I+1, 4).Value = objRS("Title")
objExcel.ActiveSheet.Cells(I+1, 5).Value = objRS("Firstname")
objExcel.ActiveSheet.Cells(I+1, 6).Value = objRS("MiddleInitial")
objExcel.ActiveSheet.Cells(I+1, 7).Value = objRS("Lastname")
objExcel.ActiveSheet.Cells(I+1, 8).Value = objRS("Sufresolve")
objExcel.ActiveSheet.Cells(I+1, 9).Value = objRS("Address")
objExcel.ActiveSheet.Cells(I+1, 10).Value = objRS("City")
objExcel.ActiveSheet.Cells(I+1, 11).Value = objRS("State")
objExcel.ActiveSheet.Cells(I+1, 12).Value = objRS("Zip")
objExcel.ActiveSheet.Cells(I+1, 13).Value = objRS("Age")
objExcel.ActiveSheet.Cells(I+1, 14).Value = objRS("Income")
objExcel.ActiveSheet.Cells(I+1, 15).Value = objRS("HomeValue")
objExcel.ActiveSheet.Cells(I+1, 16).Value = Fixphone(objRS("phone"))
objExcel.SaveAs(Server.MapPath("Forms") & " " & strFilename)


Set objConn = Nothing
Set objExcel = Nothing
Set objRS = Nothing
Dim vntStream, oMyObject
Response.buffer = TRUE
Response.AddHeader "content-disposition","attachment; filename=" & strFileName
Response.ContentType = "software x-msexcel"

Set oMyObject = Server.CreateObject("SGObjects.BinRead")
vntStream = oMyObject.readBinFile(Server.MapPath("Forms") & " " & strFileName)


Set oMyObject = Nothing

Set fs = Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists(Server.MapPath("Forms") & " " & strFileName) Then
fs.DeleteFile(Server.MapPath("Forms") & " " & strFileName)
End If
Set fs = Nothing

End If
Posted On: Thursday, October 11, 2012 Total Views: 44
View Complete with Replies


This webpage contains content related to ASP. If question related to " Microsoft Excel error message '800a03ec'" is not helpful or you didn't find the question or answer you were looking for then you can ask a new question through contact form. Our development Team will be happy to help you. This article was posted on Thursday, October 11, 2012 and having 44 views till Sunday, August 02, 2015.

Thank You

Related Messages:

Open an excel workbook that is created from an excel macro in ASP ?  (39 Views)

I require to accept the excel file (created from an excel macro)from the user and upload to the
the server. Those excel files are password protected (both the sheet and workbook). These excel files
are created from a macro .
So If I amake an ADO connection it would say "Could not d
View Replies !
Web form to excel  (16 Views)
Has anybody ever tried this Customer insists on having web form to post to existing excel spreadsheet. My colleague agreed to do this and then got stuck and passed it to me .
I would have suggestd them to use a database myself...
What is the best way to do this I am trying to post to the spre
View Replies !
Insert data from excel to Ms Access  (30 Views)

I've a web page(.asp) which requires user to upload the MS Excel file to the server, then the background is suppose to open the file and insert the data into MS Access.Once all is done, a msgbox pop up stating insertion is complete.
Is there any method to do it or any web site available for
View Replies !
Exporting excel file  (17 Views)

i am generating a excel file on server data is fetching from database and written to excel file,when agin i run this code snippet it over write the file ,but when i tried to run on server first it export the file successentirely, but if i try to run code snippet again(database is alterd )it sho
View Replies !
Why a link to MS Word doc or excell in my web page opens up garbage?  (17 Views)

Do you've relevant code snippet that demonstrates what you're doingThis may assist others to assist you. ------------------------------------------------------------------------------------------------------------------------"Men occasionally stumble over the truth but most of them pick themsel
View Replies !
Exporting to excel  (18 Views)

Is there any method to have a page Create an excel page on the basis of a SQL query
View Replies !
Create excel file from MSSQL  (23 Views)

I've a SQL Server database that collects the info from a form. Eso so often I am required to export an excel spreadsheet from the DB for reporting purposes.Is it possible to Create an xls (or csv) file from asp code snippet so that I can point the users to a file which Creates the xls for them
View Replies !
Create excel chart on the basis of the report data  (29 Views)

I wana to automate the process of generating the excel chart using asp Program.(what is done for now is cut my report data into excel sheet and then manually use data to Create excel chart)That means the program wants to Create excel chart on the fly on the basis of the report data, is that pos
View Replies !
Parsing an excel file  (18 Views)

I've a spreadsheet that has two little bits of info that always applicationear in columns A and B but the row can vary.fundamentally I wana to loop by the file until the contents of An='Total Ed Mozley' and then display the contents of Bn.So far I've got the following but have no solution if I
View Replies !
Re:displaying recordset in excel -date sort failing  (29 Views)

I've an asp page and I am using the ContentType method of the Response Object to displaying the recordset in excel.The hardy I am having is that the excel file created has eso thing format type set to general.The recordset created contains date and when users are trying to sort the excel file u
View Replies !
Automate an export to an excel spreadsheet  (33 Views)

HelloI've a script that will take a recordset from our database and format it as an excel spreadsheet and then the user can save it on their desktop.I wana to automate the process so that the ASP (ASP 3.0) will run at a scheduled time with out a user having to initiate it. Is this possible It's
View Replies !
pdfword,excell where to start  (19 Views)

I've a web page that pulls records from a database and shows them in the browser window. I wana to have an option to download an similar page in adobe pdf format or word or excel format... I do not know where to begin. Can some body point me in the wright direction
View Replies !
use MSXML2.ServerXMLHTTP to get an excel file   (50 Views)

I try to use MSXML2.ServerXMLHTTP to get an excel file and display on line I got error message on the last line:response.write httpdoc.responseTextPlease see the following code snippet:CODEqueryString = "http: myipaddress reports WRP0553.XLS"Dim httpdocSet httpdoc = Server.CreateObject("MSXML2
View Replies !
From DB to excel using ASP - display probs  (28 Views)

I've been asked to give a CSV with a whole load of products their prices and descriptions from our database. After I've exported it using server.CreateObject ("scripting.filesystemObject") and try and open in excel the data is all over the place. I am assuming this is because of line breaks and
View Replies !
Converting to excell with formula's  (34 Views)

Converting to excell is a question asked a couple of times here this isn't the hardy, but is it possible to use formula's so that the excell file can be dynamic as well (e.g. =G3-F4) and does anybody has got experience with how can i determine the cell in your dynamic ASPKind
View Replies !
customizing excel export import with SQL Server  (41 Views)

Are tany asp code snippet out there that allows me to export import Excel via SQL SErverHaveaset of projects to do n I just want some quick scripts to speed up the workload.
View Replies !
Cannot find server- microsoft internet explore Urgent Help   (38 Views)
Hope you all having a wonderful day
Got a hardy with my localhost server..sounds pretty funny i can not figure out wots going generateing my own ASP.NET WebSite using C# and VB.NET book by Zak Ruvalcab.... fundamentally eso thing was working well from start to this point wher
View Replies !
ASP shopping cart with dreamweaver mx and microsoft access  (45 Views)
I am a student working on my year 3 project. I wana a comprehensive tutorial on developing a shopping cart( from adding items to the basket order processing to checkout) in dreamweaver mx with asp and microsoft access. Please assist.
View Replies !
menu like  (38 Views)
basically posted by : sabun ( can i make auto-opening menus like in microsoft.comare there any softwares which have to be installed in my computer
View Replies !
Reading XML Node_text using microsoft.xmldom  (44 Views)
I wana to read the text property of XML file.
My xml file is as follows::


I wana to read the values of , and more. For reading these values, my code snippet is as follows:(in asp file): file = "myfiles DomainCreden
View Replies !