Autofill Date Range

I currently in VBA have code that takes a range with the start date in the left column and the end date in the right column and does an autofill to fill in the correct dates between the range. The reason for this is we use a template that originally has 3 dates in it. the user enters the date range they want to display, the code changes the first column value, copies the last column value to the appropriate column and then copies the middle value and does the autofill

Selection.AutoFill Destination:=Range(Cells(nStartRow, nStartColumn + ccMIDDLE), Cells(nEndRow, nMoveCol - 1)), Type:=xlFillDefault

Any way of doing this with Aspose?

Hi,

Well, Aspose.Cells don't support VBA. So, your required feature is not supported.

Thank you.

I know it doesn’t support VBA Code. I wanted to know if there was a way to do this with aspose as I am trying to replace the VBA code with c# and the help of aspose.

Hi,

Well, Currently, Aspose.Cells don't have the related API for your need. You have to manually embeds your required intervals of date.

Thank you.

You can use Cell.PutValue method to set data as you expected.

Do you have an example of how this may work? I have used the Cell.PutValue for a single cell but not for multiple Cells. Or do you mean to loop thru each cell in the range and put the particular value?

Hi,

Yes, using Cell.PutValue(), you can input your required Date intervals into the specified cells of the range.

Thank you.