How to perform jQuery upload xls file?

Asked By 100 points N/A Posted on -
qa-featured

Hello experts,

How to perform jquery upload xls file? I just want to be informed if it is possible to upload xls file in jquery? A .xls file was rendered from a microsoft excel application. I don’t have a strong foundation when it comes to jquery and other topic related to this. I need some expert to help and guide me along the uploading process.

Thanks.

SHARE
Answered By 0 points N/A #184021

How to perform jQuery upload xls file?

qa-featured

Yes. Xls file is uploading is possible on the web like any other kind of file. If you want to use Jquery, you can find many tutorials across the web. The best place to search for it is the Jquery site itself. Like any other Javascript framework, Jquery also uses a hidden IFrame for file upload.

If you want to upload only one .xls file, you need to validate it before uploading. Following is a code snippet for validation,

$("#form").bind("submit", function(){

  var ext = $('#file').val().split('.').pop().toLowerCase();

  if($.inArray(ext, ['xls']) == -1) {

    alert('invalid extension!');

  }

});

Related Questions