Gero esse csv
public ActionResult geraExcel()
{
List<vwFinancingReportViewModel> lista = new List<vwFinancingReportViewModel>();
lista = dadosPlanilha();
StringBuilder sb = new StringBuilder();
sb.Append("Status;Nro.Pessoal;Nome Completo;Grade;Nro.Solicitação;Data Financiamento;" +
"Ano Fabric.;Modelo;Chassi;Valor Bem;Valor Financiado;Status Solicitação;Status Pagamento;" +
"Valor Parcela;Juros;ReembolsoKM;Reembolso Depreciação;Sequencia;Data Pagamento\r\n");
foreach(var item in lista)
{
sb.Append(item.valuepayment.ToString() + ";" + item.chassi.ToString() + ";" + item.solicitationid.ToString() + "\r\n");
}
//sb.Append("Eduardo;11111\r\n");
//sb.Append("Coutinho;22222\r\n");
HttpContext.Response.Clear();
HttpContext.Response.AddHeader("content-disposition", string.Format("attachment;filename=" + DateTime.Now.ToString("yyyyMMdd") + "ReportFinanciamentoRH.csv"));
HttpContext.Response.ContentType = "application/CSV";
HttpContext.Response.ContentEncoding = System.Text.Encoding.Default;
HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Response.Write(sb.ToString());
HttpContext.Response.End();
return null;
}
Can I increase the size of the cell, so that when I open the file via excel, the name (column header) can appear correctly, without the need for me to increase the cell?