angular-js-xlsx icon indicating copy to clipboard operation
angular-js-xlsx copied to clipboard

"Accept" attribute in the generated <input type="file">

Open germanger opened this issue 7 years ago • 1 comments

Hello,

Thanks for this directive!

Have you considered adding accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" to the directive template?

  template: '<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />',

This way only ".xlsx" files will be listed in the file dialog

germanger avatar Apr 13 '17 02:04 germanger

Don't know how to pass this file from input to the dialog to the angular screen. I am using meanjs.org

I added the input tag before and after

<js-xlsx onread="read" onerror="error"></js-xlsx>

in the .html view template, but nothing happened.

The directive is being loaded correctly though.

staminna avatar Apr 18 '17 12:04 staminna