0

Hi everyone!

Imagine that i have a timer that each 30 seconds it adds 3 to the variable final. Variable final is shown on excel sheet when user press "Export", on cell [5,2].
I added this on the timer:

numero++;

            if (numero == 5)
            {
                numero = 0;
                final += 3;
            }
            
                label1.Text = final.ToString();

Then next time user opens the program and push start button again (timer start) i want to add this time to the previously time on the excel sheet.

I had already done the function that saves the file . .

string activDir = @"C:";
    string newPath = System.IO.Path.Combine(activDir, "exemplo");
    System.IO.Directory.CreateDirectory(newPath);

    ws.SaveAs(@"C:\exemplo\teste.xls");

Now i just need that. . Each time the user presses "Export" first of all program needs to read what is is cell [5,2] and then add the new final value.

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by MyPianoSucks
0

Read value from excel sheet from the cell "cell [5,2]" and assign it to "final" variable when you start program each time.

0

Thanks, i'm getting an error . "Cannot convert null to 'double' because it is a non-nullable value type" What's the problem?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.