SEARCH YOUR SOLUTION HERE  

Microsoft Excel error message '800a03ec'

everyone. I've SQL Server with many websites (database driven). I've a download function that works just fine on one of the websites (the original). I've duplicated the database and generated a second web site with all of the same functionaly except for the Database Connect. I'm 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 can't access the file 'D: Websites www.hh.com Forms'. There are many 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 software, 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
SetVars("all")
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
objRS.Close()
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
objRS.Close()
If Len(Trim(agntLastname)) > 0 Then
strFilename = Trim(agntLastname)
Else
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
objRS.Close()
objConn.Close()
Set objRS = Nothing
Set objConn = Nothing
Response.Write("Nothing to download. Pls use ur browser's BACK button to return.")
Response.End
Else
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"))
objRS.MoveNext()
Loop
objExcel.SaveAs(Server.MapPath("Forms") & " " & strFilename)
objExcel.Application.Quit

objRS.Close()
objConn.Close()

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)

Response.BinaryWrite(vntStream)

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
Response.End

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




Related Messages:

Open an excel workbook that is generated from an excel macro in ASP ?  (13 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 make 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 generated . 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 E-mail - hsinha80@rediffmail.com
View Replies !
Web form to excel  (3 Views)
Has anybody 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 db myself...
What is the best way to do this I'm 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 solution where to go next.
View Replies !
Insert data from excel to MS access  (5 Views)

I have a web page(.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 Microsoft 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  (3 Views)

I'm generating a excel file on server data is fetching from db 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 do 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()
response.end
end if
>set objconn=server.CreateObject("adodb.connection")
objconn.connectionstring="DSN=shopping;server=samit;database=db_shopping;UID=sa;PWD=sa;"
objconn.open()
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 ""
next
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 ""
Next
objrs.MoveNext
act.WriteLine ""
wend
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
act.WriteLine ""
' close the document
act.close
>

  
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 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 themselves up and hurry off as if nothing ever happened."- Winston Churchill
View Replies !
Exporting to excel  (3 Views)

Is there a way to have a page generate an excel page on the basis of a SQL query
View Replies !
create excel file from MSSQL  (3 Views)

I have a SQL Server db that collects the info from a form. Every so often I'm required to export an excel spreadsheet from the DB for reporting purposes.Is it possible to generate an xls (or csv) file from asp code snippet so that I can point the users to a file that generates 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 DB contents.
View Replies !
create excel chart based on the report data  (5 Views)

I need 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 generate excel chart)That means the program needs to generate excel chart on the fly on the basis of the report data, is that possible If It's, can somebody shed a light on me
View Replies !
Parsing an excel file  (3 Views)

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

I have an asp page and I'm using the ContentType method of the Response Object to displaying the recordset in excel.The difficulty I'm having is that the excel file created has every thing format type set to general.The recordset created 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 assistance 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  (8 Views)

HelloI have a script that will take a recordset from our db 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've 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 alter the script from having the user save to just generating the file and then ftping it to the designated ftp server. So I think my difficulty is How do I have an ASP page execute automatically from the serverI applaud any input.Warmest
View Replies !
pdfwordexcell where to start  (6 Views)

I have a web page that pulls records from a db and shows them in the browser window. I want to have an option to download an identical 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   (5 Views)

I try to use MSXML2.ServerXMLHTTP to receive an excel file and show 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 Db 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'm assuming this is because of line breaks and suchlike. Does anybody know of anyway to clean up the data (its the description field) so that each product is presented 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  (3 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 anybody has got experience with how can i determine the cell in ur dynamic ASPKind
View Replies !
customizing excel export import with SQL Server  (2 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 !
Can not find server- microsoft internet explore Urgent Help   (10 Views)
guys
Hope u all having a wonderful day
Got a difficulty with my localhost server..sounds pretty funny i can not figure out wots going on....am creating my own ASP.NET Web site using C# and VB.NET book by Zak Ruvalcab.... Fundamentally 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: can't find server- microsoft ie. tried to open other pages ....same thing..checked my iis settings and every thing seems to be ok.... but i can not 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 anybody please Assist
View Replies !
ASP shopping cart with dreamweaver mx and Microsoft access  (7 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 MS access. Pls assist.
View Replies !
menu like microsoft.com  (6 Views)
Basically placed by : sabun (sabun@lords.com)How do I make auto-opening menus like in microsoft.comare there any softwares that have to be installed in my computer
View Replies !
Reading XML Node_text using microsoft.xmldom  (5 Views)
I need to read the text property of XML file.
My xml file is given bellow:

anu
admin
dc=defdc=com
abc.def.com

I need to read the values of , and more. For reading these values, my code snippet is given bellow(in asp file): file = "myfiles DomainCredentials.xml"
file=Server.MapPath(file)
tag="Host"
Set fso =server.CreateObject("Scripting.FileSystemObject")
If fso.FileExists(file) Then
set doc = GenerateObject("Microsoft.XMLDOM")

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

doc.async = "false"
doc.load(file)

if err.number <> 0 or doc is nothing then
light_trace "error loading xml file: " & err.description
else
light_trace "xml file load ok"
end if
Dim element
element=""
element=doc.GetElementsByTagName(tag).item(0).text
end if My code failed at line "doc.GetElementsByTagName(tag).item(0).text".
Previous a long time back, This code was working fine.
But now giving error.
And also please inform me how can i retreive the error description for this line in asp I've 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 please assist me how can i read these values from given xml file
View Replies !