This is on my table I need to send to excel
This is a part of my view
<div class="panel panel-flat">
<div class="panel-heading">
<h5 class="panel-title">Tipo Planilla:<strong> @ViewBag.FrecuenciaPagoDescripcion</strong> Agencia:<strong> @ViewBag.AgenciaDescripcion</strong> Planilla Numero:<strong> @ViewBag.PlaNumero</strong> Fecha Inicio:<strong> @ViewBag.PlaFechaInicio</strong> Fecha Fin:<strong> @ViewBag.PlaFechaFin</strong>@*ALIMENTOS DE CORTES: Planilla de <strong>@ViewBag.TipoPlanillaDescripcion</strong>*@</h5>
<div class="heading-elements">
<ul class="icons-list">
<li><a data-action="collapse"></a></li>
<li><a data-action="reload"></a></li>
<li><a data-action="close"></a></li>
</ul>
</div>
</div>
@*<table id="TblMercancias" class="table table-xxs datatable-responsive">*@
<table id="TblMercancias" class="table table-xxs datatable-responsive" >
<thead>
<tr>
@*<th width="50%"><p style="white-space:nowrap"> Codigo Empleado</p></th>*@
@*<td style="font-size:larger;" class="TdValor center"> <span class="label bg-danger label-block "> <strong>@TotalDeducciones</strong> </span> </td>*@
<th style="text-align:center"><p style="white-space:nowrap;"> Codigo</p></th>
<th style="text-align:center"><p style="white-space:nowrap;"> Empleado</p></th>
<th style="text-align:center"><p style="white-space:nowrap;">Puesto</p></th>
<th style="text-align:center"><p style="white-space:nowrap;">Sueldo Base</p></th>
<th style="text-align:center"><p style="white-space:nowrap;">HE 25 PRO</p></th>
@*Encabezado de los Beneficios Frecuentes*@
@if (ViewBag.otrosBeneficiosLista != null)
{
foreach (var BeneficiosFrecuente in (IEnumerable<RecursosHumanos.Models.BeneficiosFrecuentesNombre>)ViewBag.BeneficiosFrecuentes)
{
foreach (var beneficiosSeleccionados in (List<string>)ViewBag.otrosBeneficiosLista)
{
if (BeneficiosFrecuente.DedDescripcion == beneficiosSeleccionados)
{
<th style="text-align:center"><p style="white-space:nowrap;"> @beneficiosSeleccionados</p></th>
}
}
}
}
@*Encabezado de losBeneficios No Frecuentes*@
@if (ViewBag.otrosBeneficiosLista != null)
{
foreach (var BeneficiosNoFrecuente in (IEnumerable<RecursosHumanos.Models.BeneficiosNombre>)ViewBag.BeneficiosNoFrecuentes)
{
foreach (var beneficiosSeleccionados in (List<string>)ViewBag.otrosBeneficiosLista)
{
if (BeneficiosNoFrecuente.DedDescripcion == beneficiosSeleccionados)
{
<th style="text-align:center"><p style="white-space:nowrap;"> @beneficiosSeleccionados</p></th>
}
}
}
}
<th><p style="white-space:nowrap;">Tot.Devengado</p></th>
<th><p style="white-space:nowrap;">IHSS</p></th>
<th><p style="white-space:nowrap;">RAP</p></th>
@*Encabezado de las Deducciones*@
@if (ViewBag.Deducciones != null)
{
foreach (var deduccionesFreNombre in (IEnumerable<RecursosHumanos.Models.DeduccionesFrecuentesNombre>)ViewBag.solicitud)
{
foreach (var Deduccion in (List<string>)ViewBag.Deducciones)
{
if (deduccionesFreNombre.DedDescripcion == Deduccion)
{
<th style="text-align:center"><p style="white-space:nowrap;">@Deduccion</p></th>
}
}
}
}
@*Encabezado de las Deducciones*@
@if (ViewBag.Deducciones != null)
{
foreach (var Deducciones in (IEnumerable<RecursosHumanos.Models.DeduccionesNombre>)ViewBag.deduccionesN)
{
foreach (var Deduccion in (List<string>)ViewBag.Deducciones)
{
if (Deducciones.DedDescripcion == Deduccion)
{
<th style="text-align:center"><p style="white-space:nowrap;">@Deduccion</p></th>
}
}
}
}
<th style="text-align:center"><p style="white-space:nowrap;">Tot.Deducciones</p></th>
<th style="text-align:center"><p style="white-space:nowrap;">Pago Neto</p></th>
</tr>
</thead>