C# Snippets
Sample_RegionalBreakdownByDay
private static void Sample_RegionalBreakdownByDay(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 9, 5) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Regional Breakdown by Day", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 1, "Region 1", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 2, "Region 2", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 3, "Region 3", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 4, "Region 4", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 2, 0, "Monday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 3, 0, "Tuesday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 4, 0, "Wednesday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 5, 0, "Thursday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 6, 0, "Friday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 7, 0, "Saturday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 8, 0, "Sunday", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(2, 1), 6, 3, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_RegionalBreakdownByYear
private static void Sample_RegionalBreakdownByYear(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 6, 5) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Regional Breakdown by Year", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 1, "Region 1", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 2, "Region 2", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 3, "Region 3", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 4, "Region 4", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 2, 0, System.DateTime.Now.AddYears(-1).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 3, 0, System.DateTime.Now.AddYears(-2).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 4, 0, System.DateTime.Now.AddYears(-3).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 5, 0, System.DateTime.Now.AddYears(-4).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(2, 1), 3, 3, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_RegionalBreakdownInJanuary
private static void Sample_RegionalBreakdownInJanuary(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 33, 5) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Regional Breakdown in January", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 1, "Region 1", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 2, "Region 2", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 3, "Region 3", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 4, "Region 4", false, Excel.XlHAlign.xlHAlignRight, "");
for (int irowcount = 1; irowcount <= 31; irowcount++)
{
System.DateTime dtDate = new System.DateTime(2012, 1, 1);
Cell_OffsetFormat(objStartCell, 1 + irowcount, 0, dtDate.AddDays(irowcount - 1).Date.ToString(),
false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
}
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(2, 1), 30, 3, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_SalesByCountryHorizontal
private static void Sample_SalesByCountryHorizontal(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 3, 6) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Sales by Country (horizontal)", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 0, "France", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 1, "Germany", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 2, "Japan", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 3, "UK", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 4, "Australia", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 5, "Other", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(2, 0), 0, 5, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_SalesByCountryVertical
private static void Sample_SalesByCountryVertical(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 7, 2) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Sales by Country (vertical)", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 0, "France", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 2, 0, "Germany", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 3, 0, "Japan", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 4, 0, "UK", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 5, 0, "Australia", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 6, 0, "Other", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(1, 1), 5, 0, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_SalesByYearAndMonthNumbers
private static void Sample_SalesByYearAndMonthNumbers(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 14, 5) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Sales by Year and Month", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 1, System.DateTime.Now.AddYears(-1).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 2, System.DateTime.Now.AddYears(-2).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 3, System.DateTime.Now.AddYears(-3).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 4, System.DateTime.Now.AddYears(-4).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 2, 0, "1", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 3, 0, "2", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 4, 0, "3", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 5, 0, "4", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 6, 0, "5", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 7, 0, "6", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 8, 0, "7", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 9, 0, "8", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 10, 0, "9", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 11, 0, "10", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 12, 0, "11", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 13, 0, "12", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(2, 1), 11, 3, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_SalesByYearAndMonthText
private static void Sample_SalesByYearAndMonthText(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
if (SelectCellsConfirmation(objStartCell, 14, 5) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Sales by Year and Month", true, Excel.XlHAlign.xlHAlignLeft, "");
Cell_OffsetFormat(objStartCell, 1, 1, System.DateTime.Now.AddYears(-1).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 2, System.DateTime.Now.AddYears(-2).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 3, System.DateTime.Now.AddYears(-3).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 1, 4, System.DateTime.Now.AddYears(-4).Year.ToString(), false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 2, 0, "January", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 3, 0, "February", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 4, 0, "March", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 5, 0, "April", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 6, 0, "May", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 7, 0, "June", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 8, 0, "July", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 9, 0, "August", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 10, 0, "September", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 11, 0, "October", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 12, 0, "November", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetFormat(objStartCell, 13, 0, "December", false, Excel.XlHAlign.xlHAlignRight, "");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(2, 1), 11, 3, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_SalesOnFirstDayOfEveryMonth
private static void Sample_SalesOnFirstDayOfEveryMonth(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
int iPreviousYear;
if (SelectCellsConfirmation(objStartCell, 13, 2) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Sales on the First Day of Every Month", true, Excel.XlHAlign.xlHAlignLeft, "");
iPreviousYear = System.DateTime.Now.AddYears(-1).Year;
Cell_OffsetFormat(objStartCell, 1, 0, new System.DateTime(iPreviousYear, 1, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 2, 0, new System.DateTime(iPreviousYear, 2, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 3, 0, new System.DateTime(iPreviousYear, 3, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 4, 0, new System.DateTime(iPreviousYear, 4, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 5, 0, new System.DateTime(iPreviousYear, 5, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 6, 0, new System.DateTime(iPreviousYear, 6, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 7, 0, new System.DateTime(iPreviousYear, 7, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 8, 0, new System.DateTime(iPreviousYear, 8, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 9, 0, new System.DateTime(iPreviousYear, 9, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 10, 0, new System.DateTime(iPreviousYear, 10, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 11, 0, new System.DateTime(iPreviousYear, 11, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetFormat(objStartCell, 12, 0, new System.DateTime(iPreviousYear, 12, 1).ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(1, 1), 11, 0, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
Sample_SalesOnTwentyRandomDays
private static void Sample_SalesOnTwentyRandomDays(Excel.Range objStartCell,
double dbLowestValue,
double dbHighestValue,
int iNoOfDecimals)
{
double dbrandomnumber;
double dbdateserial;
int iPreviousYear;
Random objRandom = new System.Random();
if (SelectCellsConfirmation(objStartCell, 21, 2) == true)
{
Cell_OffsetFormat(objStartCell, 0, 0, "Sales on Twenty Random Days in a Year", true, Excel.XlHAlign.xlHAlignLeft, "");
iPreviousYear = System.DateTime.Now.AddYears(-1).Year;
dbrandomnumber = 0;
dbrandomnumber = Number_Random(dbrandomnumber, 18, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 1, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 36, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 2, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 54, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 3, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 72, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 4, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 90, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 5, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 108, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 6, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 126, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 7, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 144, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 8, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 162, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 9, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 180, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 10, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 198, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 11, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 216, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 12, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 234, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 13, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 252, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 14, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 270, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 15, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 288, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 16, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 306, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 17, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 324, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 18, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 342, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 19, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
dbrandomnumber = Number_Random(dbrandomnumber + 3, 364, 0, objRandom);
dbdateserial = new System.DateTime(iPreviousYear, 1, 1).AddDays(dbrandomnumber).ToOADate();
Cell_OffsetFormat(objStartCell, 20, 0, dbdateserial.ToString(), false, Excel.XlHAlign.xlHAlignRight, "dd-mmm");
Cell_OffsetInsertRandomNumbers(objStartCell.get_Offset(1, 1), 19, 0, dbLowestValue, dbHighestValue, iNoOfDecimals, false);
}
}
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top