Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Styling exported table #22

Closed
abiodunsulaiman694 opened this issue Jan 23, 2018 · 25 comments
Closed

Styling exported table #22

abiodunsulaiman694 opened this issue Jan 23, 2018 · 25 comments
Assignees

Comments

@abiodunsulaiman694
Copy link

Hello, any chance of being able to style the exported data? I would like to create a band for the header column to differentiate it. Probably style multiple datasets differently, possibly add caption for data and brand the document with the organization name and logo. Thanks. Love this package.

@securedeveloper
Copy link
Owner

Hello, Yes it is possible but it need a big change, I am using js-xlsx library for the movement for exporting data and they don't have a way to style it. But I already got a solution and will implement this week. Soon you will have a solution for that.

Just stay tuned.

@abiodunsulaiman694
Copy link
Author

Thanks. Expecting

@alexeymakarov90
Copy link

Is there any chance for a colspan ?:)

@securedeveloper
Copy link
Owner

Hello @alexeymakarov90 we have some major improvements in pipeline which includes but not limited to "Exporting styled data", "ColSpan and RowSpan" operations, "Formulas support" and so on.

Stay tuned.

@quarleswn
Copy link

Any further news on this? Is basic styling such as bold/italic also still in the pipeline? Or is it already possible in the current version?

@anovags
Copy link

anovags commented Mar 6, 2018

maybe there's a workaround for current version, for a simple bold/italic styling perhaps?

@securedeveloper
Copy link
Owner

@anovags @quarleswn @alexeymakarov90 all requests you guys made are already implemented (But unfortunately my reviewer is not ready to review changes yet, I will wait for 1 more day otherwise will by bass and release those changes)

@colinrobertbrooks
Copy link

@securedeveloper, this is a great library. looking forward to these changes.

@jamalashrafi
Copy link

Hi Sulaiman when will u check in the updated code, we are waiting .

@dannegm
Copy link

dannegm commented Mar 21, 2018

@securedeveloper
Copy link
Owner

@abiodunsulaiman694 @alexeymakarov90 @quarleswn @anovags @colinrcummings @jamalashrafi @dannegm this feature is implemented. Please feel free to try and let us know about your feedback.

@colinrobertbrooks
Copy link

Thank you, @securedeveloper. I just updated to 0.3.7 and am adding style to an export. Is there a way to set column and row widths (AutoFit Column Width is what I'm looking for at the moment)?

@securedeveloper
Copy link
Owner

securedeveloper commented Apr 11, 2018

Hi @colinrcummings it is a good feature, I'm looking into it, but our current release 0.3.7 support cell styling just like native excel api.

@colinrobertbrooks
Copy link

colinrobertbrooks commented Apr 11, 2018

Thanks, @securedeveloper. It turns out that the xlsx file format doesn't support AutoFit; however, while researching this I noticed that the original fork of SheetJS, which you forked for react-data-export, isn't actively maintained; style support ultimately landed in SheetJS Pro. Both forks only support cell styling. Have you seen exceljs? It's actively maintained and has style support for cells, rows and columns.

@securedeveloper
Copy link
Owner

Hi @colinrcummings, I just checked the references you mentioned, the idea of using a fork of xlsx library was to make sure we do not break things if something goes wrong with that repo, we have a plan to reference back to original repo as they are still working on this support.

Also, Autofit Column Width is possible if we go with content length, I already tested it few days ago. I just need to make sure some performance checks and if everything works we will have this support out of the box by our library not changing anything in xlsx.

By the way you can follow our ongoing tasks and plans here

@colinrobertbrooks
Copy link

colinrobertbrooks commented Apr 11, 2018

Sounds good, @securedeveloper.

Being able to style columns would be value added. For example:

{
    columns: [
      { value: 'Col 1', style: { /* column style here... */} },
      /* more columns here... */
   ],
   data: [ /* rows of cells here... */ ]
}

As a workaround, one can render an empty column, render the columns as styled cells and use ySteps to adjust.

Thanks again for your work on this.

@pedrobrost
Copy link

pedrobrost commented Apr 17, 2018

It would be very nice to have the AutoFit feature :)

@gmonte
Copy link

gmonte commented Jun 12, 2018

Hi guys. About AutoFit, any news?

@diegohdez90
Copy link

Hi programmers, it would be nice if add style for data key in ExcelSheet Props, what do you think?

@vvicario
Copy link

HI! About AutoFit, any news?

@uditdubey
Copy link

Hello @securedeveloper , can you show with the example how to add colspan. Version of react-data-export i m using is "^0.5.0" .

@securedeveloper
Copy link
Owner

Hi @uditdubey, it's possible to apply colspan but unfortunately, the functionality is not supported yet with the current version. Will keep in the agenda for this year.

@uditdubey
Copy link

uditdubey commented Jan 3, 2019

Hi @securedeveloper i somehow managed to style the table to look like colspan. Is there anyway to style the column name border. As the style attribute works only for data array and not for column name. I want to remove the left and right borders. Stuck !!
capture

Thanks !!

@Dhara159
Copy link

Hi @securedeveloper i somehow managed to style the table to look like colspan. Is there anyway to style the column name border. As the style attribute works only for data array and not for column name. I want to remove the left and right borders. Stuck !!
capture

Thanks !!

Hey @uditdubey Can you provide some hint on how you managed to do colSpan with header? I am using v0.4.2. Is repo support available for colspan till now?

@Natalyiia
Copy link

Hi @securedeveloper i somehow managed to style the table to look like colspan. Is there anyway to style the column name border. As the style attribute works only for data array and not for column name. I want to remove the left and right borders. Stuck !! capture

Thanks !!

HI @uditdubey could you please describe how you did this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests