Microsoft Excel error message '800a03ec'

everyone. I have SQL Server with several websites (database driven). I have a download function that works just fine on one of the websites (the original). I have duplicated the database and created a second web site with all of the same functionaly except for the Database Connect. I am using the same exact code snippet for both however on the site that I want to work I get the following error message:Microsoft Excelerror '800a03ec'
Microsoft Excel cannot access the file 'D: Websites Forms'. There are several possible reasons: The file name or path name does not exist. The file you are attempting to open is being used by another Program. Close the document in the other program, and try again. The name of the workbook you are attempting 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 ideas I will copy the asp file that I'm using to perform this download function given below (the orignal page redirects passing the ID numbers).
I applaud any ideas 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, Suffix, "
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. Pls use ur 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("Suffix")
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 = "application 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: 126
View Complete with Replies

Related Messages:

Open an excel workbook that is generated from an excel macro in aSP ?  (18 Views)

I require to accept the excel file (generated 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 generated from a macro .
So If I amake an aDO connection it would say "Could not decrypt file".
When I use excel Object , some of the excel files open . Most of the time the browser hangs .
In the code snippet , I feel , when I use
set excelapp = server.CreateObject("Excel.Application")
excelapp.Workbooks.Open("C: data excelfile.xls")
sometimes , the Object itself isn't created . If I mention the property of the excel file as Read Only
then a few other non-relative error message occurs .
I think the propery of the excel file generated from a macro is various than a normal excel file. could u
please find a solution to this problem aspect
Can u please assist me with a solution
my email -
View Replies !
Web form to excel  (5 Views)
Has anyone ever tried this Client 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'd have advised them to use a database myself...
What is the best way to do this I am attempting to post to the spreadsheet and keep getting bugs. Once I had made sure that the formats of all fields and more matched what was being placed I then got a message saying that one or more required parameters was missing; but I was posting 19 data items to 19 columns so no idea where to go next.
View Replies !
Insert data from excel to Ms access  (6 Views)

I have a webpage(.asp) that 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 a way to do it or any web site available for my reference about this
Please assist.
View Replies !
Exporting excel file  (6 Views)

i am creating a excel file on server data is fetching from database and written to excel file,when agin i execute this code snippet it over write the file ,but when i tried to execute on server first it export the file successfully, but if i try to execute code again(database is changed )it displays the previous one in excel file , how can i correct it(It's working fine in my localhost)my code is given given below:
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.addHeader "pragma","no-cache"
Response.addHeader "cache-control","private"
Response.CacheControl = "no-cache"
>if (trim(session("admin_permission")) <> "administrator") then
Response.Redirect "adminlogin.aspuniq_rand=" & rnd(10000000000000000000)
call TerminateConnection()
end if
>set objconn=server.CreateObject("adodb.connection")
set objrs=objconn.Execute("select autoid as [ID] ,smaller_picture as [Path],itemname as [Name],itemunitprice as [TWPrice],itemcode as [Code] from itemmaster")
set fso = generateObject("scripting.filesystemObject")
'Create the text (xls) file to the server adding the -mmddyyyy after the g_title value
Set act = fso.CreateTextFile(server.mappath("Yahoo" & month(date())& day(date())& year(date()) &".xls"), true)
act.WriteLine "=""urn:schemas-microsoft-comffice:excel"">"
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""& "Amazon" &""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine " "
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
For i = 0 to objrs.fields.count - 1
act.WriteLine ""
act.WriteLine ""
act.WriteLine (objrs(i).name)
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
while not objrs.eof
act.WriteLine ""
For i = 0 to objrs.fields.count - 1
act.WriteLine ""
act.WriteLine objrs(i)
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
' close the document

Ur excel has been successfully generated and can be viewed by clicking
.xls" target="_blank">herethanx
View Replies !
Why a link to MS Word doc or excell in my webpage opens up garbage?  (3 Views)

Do u have relevant code snippet that demonstrates what u are doingThis may assist others to assist u. ------------------------------------------------------------------------------------------------------------------------"Men occasionally stumble over the truth but most of them pick themselves up and hurry off as if nothing ever happened."- Winston Churchill
View Replies !
Exporting to excel  (4 Views)

Is there a way to have a page create an excel page based on a SQL query
View Replies !
create excel file from MSSQL  (7 Views)

I have a SQL Server database that collects the info from a form. Every so often I am required to export an excel spreadsheet from the Database 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 that creates the xls for them taking me out of the loopPreferably it want no compnants installed on the web server.The data to be exported are the headers then the Database contents.
View Replies !
create excel chart based on the report data  (6 Views)

I want to automate the process of creating 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 needs to create excel chart on the fly based on the report data, is that possible If It's, can somebody shed a light on me
View Replies !
Parsing an excel file  (8 Views)

I have a spreadsheet that has two bits of information that always appear in columns a and B but the row can vary.Basically I want to loop by the file until the contents of an='Total Ed Mozley' and then display the contents of Bn.So far I have got the following but have no idea if I am even on the right track
View Replies !
Re:Displaying recordset in excel -date sort failing  (6 Views)

I have an asp page and I am using the ContentType method of the Response Object to displaying the recordset in excel.The difficulty I am having is that the excel file generated has every thing format type set to general.The recordset generated contains date and when users are attempting to sort the excel file using date,its treating date as general and sorting is failing.I havent been able to find any assist on the internet.Can I cast the field to set it to certain data typePlease assist
View Replies !
automate an export to an excel spreadsheet  (14 Views)

HelloI have 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'd like to automate the process so that the aSP (aSP 3.0) will execute at a scheduled time with out a user having to initiate it. Is this possible It's our server and we have complete control over what can do.I have an ftp component that I can use to transfer the file to a specific ftp server so I can change the script from having the user save to just creating the file and then ftping it to the designated ftp server. So I think my difficulty is how can I have an aSP page execute automatically from the serverI applaud any input.Warmest
View Replies !
pdfwordexcell where to start  (11 Views)

I have a webpage that pulls records from a database and displays them in the browser window. I want to have an option to download a similar page in adobe pdf format or word or excel format... I do not know where to begin. Can somebody point me in the wright direction
View Replies !
use MSXML2.ServerXMLHTTP to get an excel file   (12 Views)

I try to use MSXML2.ServerXMLHTTP to receive an excel file and display on line I got error message on the last line:response.write httpdoc.responseTextPlease view the following code snippet:CODEqueryString = "http: myipaddress reports WRP0553.XLS"Dim httpdocSet httpdoc = Server.CreateObject("MSXML2.ServerXMLHTTP")httpdoc.Open "Receive", queryString, Falsehttpdoc.SendResponse.ContentType = "application vnd.MS-excel"response.write httpdoc.responseTextPlease assist
View Replies !
From Database to excel using aSP - display probs  (8 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 suchlike. Does anyone know of anyway to clean up the data (its the description field) so that each product is displayed on just one line in the csvI have been using:description = Replace(description,"","")to remove certain html elements but the difficulty remains.
View Replies !
Converting to excell with formula's  (8 Views)

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

are tany asp code snippet out there that allows me to export import Excel via SQL SErverHavealot of projects to do n I just want some fast scripts to speed up the workload.
View Replies !
Cannot find server- microsoft internet explore Urgent assist   (22 Views)
Hope u all having a wonderful day
Got a difficulty with my localhost server..sounds pretty funny i cant figure out wots going creating my own aSP.NET Web site using C# and VB.NET book by Zak Ruvalcab.... Basically every thing was working well from start to this point where I am now creating a functionS sample page, saved it and tried to see it as usual but this time no display, i receive this message: cannot find server- microsoft ie. tried to open other pages ....same thing..checked my iis settings and every thing seems to be ok.... but i cant still see my sample pages. I restarted my pc and still no display and each time i try http: localhost folder firstpage.aspx or other sample pages I have but still no display.
Could anyone please Assist
View Replies !
aSP shopping cart with dreamweaver mx and microsoft access  (12 Views)
I am a student working on my year 3 project. I want 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  (9 Views)
Originally placed by : sabun ( can I amake auto-opening menus like in microsoft.comare there any programs that have to be installed in my computer
View Replies !
Reading XML Node_text using microsoft.xmldom  (23 Views)
I want to read the text property of XML file.
My xml file is as follows:


I want to read the values of , and more. For reading these values, my code snippet is as follows(in asp file): file = "myfiles DomainCredentials.xml"
Set fso =server.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(file) Then
set doc = CreateObject("Microsoft.XMLDOM")

if err.number <> 0 or doc is nothing then
light_trace "error creating xmldom: " & err.description
light_trace "Create xmldom ok"
end if

doc.async = "false"

if err.number <> 0 or doc is nothing then
light_trace "error loading xml file: " & err.description
light_trace "xml file load ok"
end if
Dim element
end if My code failed at line "doc.GetElementsByTagName(tag).item(0).text".
Earlier a long time back, This code was working fine.
But now giving error.
and also please tell me how can i retreive the error description for this line in asp I have tried following options also:
1. doc.GetElementsByTagName(tag).item(0).childnodes(0 ).text also
2. doc.selectsinglenode(" Domain_Credentials Host").text But no luck. Can anybody pls assist me how can i read these values from given xml file
View Replies !