Hello.
I asked you a question the other day, but let me ask you a question once again because there was not an answer.
It is one step more, but I want to increase only 1st on the date that I led by a DATE function, but do not work by this program.
Will there be measures method?
Excel excel = new Excel();
excel.Open(@"C:\TEMP.XLS");
Worksheet sheet = excel.Worksheets[0];
DateTime dt = new DateTime(2005,12,24);
sheet.Cells[1,1].PutValue(dt);
sheet.Cells[0,0].Formula = "=YEAR(B2)";
sheet.Cells[0,1].Formula = "=MONTH(B2)";
sheet.Cells[0,2].Formula = "=DAY(B2)";
sheet.Cells[1,0].Formula = "=DATE(A1,B1,C1)";
sheet.Cells[1,2].Formula = "=B1+1";
excel.CalculateFormula();
Console.WriteLine(sheet.Cells[1,0].StringValue);
Console.WriteLine(sheet.Cells[1,2].StringValue);
The output on the console is:
2005/12/24 0:00:00
#VALUE!
Why will not it be output as follows?
2005/12/24 0:00:00
2005/12/25 0:00:00
daimaru(japan)
I translate this sentence by translation software