About Dennis Cassøe Expertise ASP in many areas, to include them all would not be possible but some examples:
Database access (SQL server, access)
Forms
Functions
Components like aspsmartupload, aspupload, FileSystemObject, jmail
And much more.
Can`t always garenty an answer, but will do my best.
Experience Have teached courses in ASP (for beginners)
Created
Knowledgebases
E-commerce applications
Ordinary updatable homepages
Organizations belong to Aarhus School of Business, Denmark
Freelance programmer
Education/Credentials Graduate student at the Aarhus School of Business, Denmark
Expert: Dennis Cassøe Date: 7/2/2005 Subject: Create Excel in asp
Question Sir i m using the following code:
<%
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
xml.Open "GET", "http://localhost:81/ankit/test.htm", False
xml.Send
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("c:\test.xls",true)
fname.WriteLine xml.responseText
fname.Close
set fname=nothing
set fs=nothing
response.write a
Set xml = Nothing
%>
This code creates excel file successfully.But i use to conncet this excel file using
<%
Set cnnExcel = Server.CreateObject("ADODB.Connection")
It gives an error :External table is not in the expected format.
But when i open and save then it ask the location for save (why i dont know.?).Then i save it again on the same location i.e. C:/
Now After saving i m successfully connceted to excel file and can make a query.But after saving it manually.Can you please tell me why this file is not saved in C: when i using the above code.
I am trying it from last three days and get rid of.Please give me some solution as soon as possible.I vl be highly obligue to you.Its very urgent.
Regards
Ankit jain
Answer Hi
Im not sure, but it could be, that when you create the excel file by importing test.htm, test.htm is not a correct excel file, and this is being corrected when you open it up in excel and save it from there, because it will probably then include the missing code in the file.
Therefore I would make two files, one that is downloaded from test.htm, and one that is like the one before, but this has been opened in excel and save there, then I would compare the two files and look for differences.