I have an automatism that takes data from different data sources, the problem is that there are some decimal data that I save as text.
How can I do so that I do not save these numbers as text?
This is what I have now
//Variables interop para excel, xlWorksheet es la hoja de excel.
String excel[100,100]; //Array bidimensional
/* Mapeo el excel a la matriz */
//Aquí habría código
/* Relleno la matriz con datos String */
//Aquí recogería información
/* Mapeo la matriz al excel */ <---- aquí empieza el problema
xlWorksheet.Cells[i, j] = Convert.ToDouble(excel[fila, columna]); <-- esto es String
Range r = (Range)xlWorksheet.Cells[fila, columna];
r.NumberFormat = "#0.00";
I've also tried with
r.NumberFormat = "#0,00";