0
I’m making a console application that reads data from a spreadsheet and compares it with values reported in the database. There is a default value, if a field of this worksheet is not filled in, I need to take the value of the database and set it in the worksheet in the cell that was not filled in. My difficulty is being how to set this value in this cell. I can do it in a new cell.
public class EscreverPlanilha {
public void EscreveValorDefault(Campo campo, string column) {
var str = new StringBuilder();
str.Append(campo.ValorDefault);
}
}
How are you accessing the spreadsheet? through open xml?
– Marco Antonio Quintal
I am using the Streamreader <br> List<string> list = new List<string>(); Try { using (Streamreader Rd = new Streamreader(path)) { string line = null; while ((line = Rd.Readline()) != null) { list. Add(line.Tostring()); } Rd.Close(); Rd.Dispose(); Return list; } }
– Michele
I think it is best to use Open XML. https://msdn.microsoft.com/pt-br/library/office/hh298534.aspx
– Marco Antonio Quintal