How to read an excel file on web from its download URL using HTML and javascript automatically (without having to download it) -


i have url,

abc.com/download?fileid=123&entity_id=456&sid=101

which downloads excel file when click link. instead of downloading it, want read contents html & javascript in order process information automatically.

is there way that? not familiar web programming therefore not sure how proceed. have tried following, nothing happened.

var excel = new activexobject("excel.application"); var excel_file = excel.workbooks.open("url here"); var excel_sheet = excel_file.worksheets("sheet1"); var data = excel_sheet.cells(1,2).value; alert(data); 

edit: question different linked 1 trying figure out how initial raw data parsed once variable (however simple answer might be, not find anywhere else , first practice web couldn't find way around).

can code above access file in url? not know how test , writing alert(data) returns no result. how know have data work with, before start parsing?

edit2: following returns when urlstring="www.google.com", not return url have, because download link.

$.get(urlstring, function(data, status){ alert("data: " + data + "\nstatus: " + status);}); 

microsoft exel files (xls|xlsx) proprietary format. need lot of work in order transform them form can manipulated javascript , injected html document.

luckily geeky boffins have done hard work already, in form of js-xls , js-xlsx javascript libraries.

see this page @ codetheory.com brief breakdown of capabilities.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -