garrisonian14 Posted September 1, 2008 Share Posted September 1, 2008 Hi Friends, All of you may have seen on websites that we click on a link and it opens pdf document in browser. I want to do same thing but for excel documents. i want to implement it for excel documents i.e. if a user clicks on a link it opens an excel sheet in same browser window. i tried <a href="test.xls">My sheet</a>. it worked in I.E 7. but it doesn't work in firefox and I.E 6. Please help me for this implementation. It is very urgent. Thanks, Ali Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/ Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 Having a link which points to an excel file, will prompt the user to download it or open it up with Excel. I'm sure you can find libraries (like this one i found google-ing) and extensions for dealing with excel files, letting you read or write them. By reading, I mean having a nice presentation of the excel file with html tables. I'm sorry, but i don't know of any other way. Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/#findComment-631023 Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 use iframe lol <iframe src="file.xcl" ></iframe> Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/#findComment-631031 Share on other sites More sharing options...
garrisonian14 Posted September 1, 2008 Author Share Posted September 1, 2008 friend thanks for ur reply. using iframes is same as using path of xls file in src of href. it doesn't open file in browser , it simply gives popup to open with or save foe as pop up and opens file separately instead of opening in browser window. Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/#findComment-631047 Share on other sites More sharing options...
valtido Posted September 1, 2008 Share Posted September 1, 2008 thats strange because i have used word powerpoint n excel on iframes and they work fine other than that you could open the excell file and save it as an HTML page if that helps Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/#findComment-631048 Share on other sites More sharing options...
Fadion Posted September 1, 2008 Share Posted September 1, 2008 other than that you could open the excell file and save it as an HTML page That should be quite a manual work. I'm still of the opinion that the best approach on this is reading the excel file (with any php libraries or extensions) and generating an html table. Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/#findComment-631120 Share on other sites More sharing options...
blinky001 Posted September 1, 2008 Share Posted September 1, 2008 There are lots of php classes to do this, from Google you could try this one: http://www.phpclasses.org/browse/package/3797.html - returns the data as a php array. Enjoy Link to comment https://forums.phpfreaks.com/topic/122211-how-to-open-excel-sheet-in-browser-using-php/#findComment-631215 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.