I have a C # project that is normally generating a file with .CSV extension, but I want to write a; (semicolon) but it does separate the cell. Is there any way to write without this happening?
Code:
arquivo.Detalhe = new List<Detalhe>();
int sequencial = 1;
foreach (var c in clientes)
{
Detalhe d = new Detalhe();
var cob = c.Value.First();
d.Endereco = c.Key.Endereco + "\";\"";
d.Bairro = c.Key.Bairro.Nome + "\";\"";
d.Cidade = c.Key.NomeCidade + "\";\"";
arquivo.DetalheGD7.Add(d);
}
Creating the file:
var arquivo = Service.CriarArquivo(paraEnviar, inclusaoRadioButton.Checked, motivo);
TextFile.Serializer.Serialize(arquivo, localDoArquivoTextBox.Text + "\ARQUIVO_.CSV");
The photo of how the file comes out:
Ignore the spacing, other information that has not been populated yet.
I think there will be no need to show the other files, since my doubt is just how to write the; without the cell breaking happening.