Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Excel sheet

Status
Not open for further replies.

DeSn

Programmer
Nov 20, 2001
111
0
0
BE
Hi,

I try to open and Excel sheet in IE (or netscape, the both don't work) and I receive strange signs. When I drap the sheet in IE, it works fine.

t = window.open("rapportering.xls","rapportgenerator","toolbar,status,menubar,resizable,location");

Any ideas?
 
I'm sorry... could you please rewrod the problem? I don't understand what you mean by:

DeSn said:
When I drap the sheet in IE, it works fine.

Jeff
 
I mean "when I drop the MS Excel Sheet in IE" with drap and drop.
 
You will need to ensure that the http server you are using (IIS?) is configured to serve the correct header values for xls files. That's about the only suggestion I would have (since you see it working fine with drag-and-drop). Your Javascript code is fine... it's something else that's causing the problem I'm thinking.

Jeff
 
DeSn,

Try this out:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>TEST</title>
<script language="JavaScript">
function openxl(fil){
if(!fil) return;
window.location = fil;
}
</script>
</head>
<body>
<input type="file" id="ofile">
<input type="button" value="Open Doc" onClick="openxl(document.getElementById('ofile').value)">
</body>
</html>

HTH



Great Javascript Resource:
 
>>You will need to ensure that the http server you are using (IIS?) is configured to serve the correct header values for xls files.

How can I do this???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top