pratik227/vue3-json-excel

Make name prop accept variables

Closed this issue · 2 comments

Instead of having to hard code the name like this:

<download-excel :data=output type="xlsx" worksheet="E-Mails" name="data.xlsx">
            <button>Download Excel </button>
</download-excel>

I would like to dynamically specify the name of the created xlsx like this:

<download-excel :data=output type="xlsx" worksheet="E-Mails" :name=myNameVar>
            <button>Download Excel </button>
</download-excel>

This does not seem to work at the moment.

@omnidepp Your syntax is wrong.


 <JsonExcel :data="json_data" :name="name">
      Download Data
      <img src="download_icon.png"/>
    </JsonExcel>

Works for for me no issues.

Thanks,
Pratik Patel

Closing these issue