|
-
October 23rd, 2002, 06:06 AM
#1
error on reading an excel file from VBScript
Can anyone please tell me how to read an excel file from VBScript(server-side)
The piece of code(vbscript-serverside) im using is given below. This code throws an error on the first line like
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: http://www.microsoft.com/contentredirect.asp.
/poc/ExcelToJs/uploadForm.asp, line 68
So, can anyone please tell me what is the actual ProgId or do i need to set something on the server
But visual basic accepts this Excel.Application ProgId
Set XL = Server.CreateObject("Excel.Application")
Set WB = XL.Workbooks.Open("E:\OBB\example.xls")
For i = 1 To WB.Sheets.Count
Set WS = WB.Sheets.Item(i)
Set r = WS.UsedRange
sRows = r.Rows.Count
i = 2
Do While i < sRows
sName(i - 2) = WS.Cells(i, 1)
semail(i - 2) = WS.Cells(i, 1)
Response.Write WS.Cells(i, 1)
Response.Write WS.Cells(i, 14) & "<br>"
i = i + 1
Loop
Next
Thankx in advance
-
October 24th, 2002, 02:35 AM
#2
Excel
Hi!
It seems for me that the excel application server (Excel) is not installed on the server.
If I have understood you are trying to start Excel on the server with command "Set XL = Server.CreateObject("Excel.Application")".
Try to check if the excel application is installed on the server.
Regards,
CP.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|