Coder Social home page Coder Social logo

customize excel output about vue-json-excel HOT 5 CLOSED

jecovier avatar jecovier commented on August 28, 2024
customize excel output

from vue-json-excel.

Comments (5)

jecovier avatar jecovier commented on August 28, 2024

Hi @t0n1zz , it's not possible to add styles to the output, but maybe it's possible to replicate that type of group, I will try tomorrow and post here the result 😃 .
If you want to hide a column, I suggest filter the data with underscore to erase the column before pass the json into the component. You can use the omit function in underscore to achieve that result. http://underscorejs.org/#omit

from vue-json-excel.

jecovier avatar jecovier commented on August 28, 2024

@t0n1zz hi, the new version have a title prop that allows you to add a row above the data with a custom text.

<download-excel
	class   = "btn btn-default"
        title = "THIS IS A TITLE"
	:data   = "json_data"
	:fields = "json_fields"
	name    = "filename.xls">

	Download Excel (you can customize this with html code!)

</download-excel>

hope this help you

from vue-json-excel.

t0n1zz avatar t0n1zz commented on August 28, 2024

hi i am sorry opening it again, but i already updated to version 0.0.7 and i put title="this is test title" but i don't find anything on the downloaded files....?

from vue-json-excel.

jecovier avatar jecovier commented on August 28, 2024

Hi @t0n1zz the current version is the 0.1.8, I just update the repository, please try this new version. I add the option to pass an array as value of the title prop, so you can get more than one title, use as follow:

<vueJsonExcel
      type = "csv"
      :title = '["DATA","title 2"]'
      name="data.csv"
      :data = "datos"
      :fields = "fields">
      CSV FILE
</vueJsonExcel>

If you only want a single title, just pass a string as value:

<vueJsonExcel
      type = "csv"
      title = 'DATA TITLE'
      name="data.csv"
      :data = "datos"
      :fields = "fields">
      CSV FILE
</vueJsonExcel>

try the new version and tell me if this solve your problem.

from vue-json-excel.

t0n1zz avatar t0n1zz commented on August 28, 2024

okay thank you so much... i see you have changed something too in json_fields in this new version but i can make it work... great works man.... looking forward for other awesome features... cheers

from vue-json-excel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.