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

Export html content #376

Closed
DDolG opened this issue Dec 19, 2022 · 3 comments
Closed

Export html content #376

DDolG opened this issue Dec 19, 2022 · 3 comments

Comments

@DDolG
Copy link

DDolG commented Dec 19, 2022

Add column with href.
c.Add(o => o.MainBarCode).Titled("BarCode").Encoded(false).Sanitized(false)
.RenderValueAs(o => $"{o.MainBarCode}");
When export to excel, the href is view in cell:
image
But I'm waited only number.

@mattiaslundborg
Copy link

I'm having the same issue. Has this been solved?

@gustavnavar
Copy link
Owner

Package 3.5.1 implements a new RenderExcelAs method in column definition to customize excel columns format.

You can construct a custom display value of the column only for the exported file using the RenderExcelAs method:

    Columns.Add(o => o.Employees.LastName)
       .RenderExcelAs(o => o.Employees.FirstName + " " + o.Employees.LastName)

@DDolG
Copy link
Author

DDolG commented Mar 7, 2023

Thank you very!
Admiro tu ingeniosa biblioteca.

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

No branches or pull requests

3 participants