Click here to Skip to main content
15,506,846 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I need help on this as the code are able to display in IE but not in Chrome.

<pre><html xmlns="" xml:lang="en" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</head>
<body>
</object>
<div align="center"><iframe src="C:\y\test.csv" width="50%" height="200"></iframe></div>
</body>
</html>


What I have tried:

I've tried it in Chrome, it does not display but directly download the excel file instead, any idea how to fix it? Your help are very much appreciate, thanks in advanced! I've tried on this site. Maybe some plugin make me wrong? Thanks for answer.
Posted
Updated 10-Apr-22 0:23am
Comments
Richard MacCutchan 9-Apr-22 11:43am    
You are trying to load a file from the user's PC, and that will not work.

There is no fix. It works in IE because there is a "viewer" that was loaded using a technology that is no longer supported because of security holes, and it was only supported in IE and Firefox.

IE doesn't exist anymore and Firefox dropped support for it a while ago.

You have to load the data and parse it into a grid yourself or use a 3rd party grid that can parse the data for you and show it. In either case, the file has to be on the server for that to happen. You cannot load it from a file on the client-side.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900