I am currently working in a export to excel of Hierarchical grid using EPPlus
. So All child rows should be displayed with padding (space). As shown below:
So as shown in above you can see I have added 4 spaces before Software, QA, Analyst etc...
I have used below code to add space:
worksheet.cells[1, 1].value = " Software";
But this doesn't seem to be proper way to me. I have tried with \t
but that doesn't work.
So is there any better approach I can use here ?
What about using Style.Indent
like this:
ws.Cells["A4"].Style.Indent = 5;
Here is a reference for how it is done inside the actual excel ui:
http://www.dummies.com/software/microsoft-office/excel/how-to-indent-cell-data-in-excel-2010/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With