Hello Everyone,
i'm a newbie in this Community. I have some Problems in C#. First of all what i want to do ist the Following.
I want to make calculation in C# and the Output should be written in an Excel-Sheet. The First Colume should have Main-Values of a Contract and the Second Colume should have the additional Values. I have defined every cell in Excel, for example A1 has the name ZB and B1 ZB_add. Overall i have 40 Values, so 50 Values for the Main Part and 50 for the additional part. The only differ in the name, as you can see the additional one have at the end "_add".
What i have do in c#
1. write an Constructor where i declare only the Main Values. It looks likes this
public class Output
{
//declare Parameters
public double ZB;
public double HV;
....
}
public Output(double? ZB,double HV,...)
{
this.ZB=ZB;
this.HV=HV;
...
}
2. I write an Array class with:
Output out= new Output[2];
out[0]= new Output(value1,value2,...); //this are the main-values
out[1]= new Output(value1_add,value2_add,...); // this are the additional values
So far so good. How can i make the output in Excel as efficienc as possible. As you can see the cells only differ in the präfix "_add".
Thanks for helping
i'm a newbie in this Community. I have some Problems in C#. First of all what i want to do ist the Following.
I want to make calculation in C# and the Output should be written in an Excel-Sheet. The First Colume should have Main-Values of a Contract and the Second Colume should have the additional Values. I have defined every cell in Excel, for example A1 has the name ZB and B1 ZB_add. Overall i have 40 Values, so 50 Values for the Main Part and 50 for the additional part. The only differ in the name, as you can see the additional one have at the end "_add".
What i have do in c#
1. write an Constructor where i declare only the Main Values. It looks likes this
public class Output
{
//declare Parameters
public double ZB;
public double HV;
....
}
public Output(double? ZB,double HV,...)
{
this.ZB=ZB;
this.HV=HV;
...
}
2. I write an Array class with:
Output out= new Output[2];
out[0]= new Output(value1,value2,...); //this are the main-values
out[1]= new Output(value1_add,value2_add,...); // this are the additional values
So far so good. How can i make the output in Excel as efficienc as possible. As you can see the cells only differ in the präfix "_add".
Thanks for helping