I have an Excel spreadsheet with two sheets, Sheet 1contains text and formulas that I want to duplicate in order to write 2,000 odd lines of C # code for my project. Extremely repetitive, so I thought I could use Excel to write it for me. Sheet 2contains an extract from my database that I want to use to populate these values. My Excel code section looks like this and spreads over more than 10 rows and 5 columns:
new AccountingPeriod()
{
MonthCovered="=Sheet2!B2",
StartDate=DateTime.Parse("Sheet2!C2"),
EndDate=DateTime.Parse("Sheet2!D2"),
AccountingPeriodDescription="Sheet2!E2",
Active='=Sheet2!F2',
April='=Sheet2!G2,
TaxYear="Sheet2!H2"
},
When I select these 10 rows and use the Excel duplication tool, I want the cell references (for example, in my table Sheet1!D3 = Sheet2!B2, I want Sheet1!D13 = Sheet2!B3 NOT Sheet2!B13) to increase by 1 rather than 10, as is done in my table.
, 10 Sheet2 , Sheet1, , .