I tried it with this formula: =DATE((YEAR(NOW()));1;1)- WEEKDAY(DATE((YEAR(NOW()));1;1);2) + C2*7 but I always get the error “Write range: the range does not exist”.
But when I insert the formula in Excel it works… and when I want to write something else in the cell it works too… So I don’t know what the problem is
And maybe I have to say that the weeknumber isn’t always 31…It’s different in every file…
Can you first try the write cell activity with a simple string. Just to make sure whether it writes that on the same cell. If that works, then we might need to consider the formula we are trying to type in
Hi Lahiru,
I have the same problem, I would like your help.
If you say that the problem is in the formula, what path do you recommend for the solution.
This is my Vlookup formula
@aferreira054 have you tried switching between excel write cell and workbook write cell? I’ve noticed sometimes one works while the other doesn’t for unknown reasons
I have tried both ways and in the excel write cell it throws me an error that says that the writing cannot be executed because there is an excel working in the background
Just a real quick look and haven’t tested anything yet, but right now you are supplying an invalid cell in the Write cell activity. You are supplying a range of cells. You need to specify one individual cell. So instead of I6:I + rowCount you need to just say “I6”. Or if you want to write multiple cells then you should use write range instead
I do not use the write range because I just want to write a formula in several cells of a column, it is not a table, if I use write range I must pass it a data table and I do not look for that.
I would like you to try it and give me your feedback please.
@aferreira054 - you can’t pass a range of cells to the write range activity. You must loop through and write cell individually, or else you must use the write range activity. It is quite simple to build a datatable with a single column containing the data, then pass that datatable to the write range activity.
Just a simple, but longer processing time (since you have to write to excel n times, where n = number of rows) you can do the loop method to write to each cell individually. You could do for each ExcelRowNum in Enumerable.Range(StartRowInteger,EndRowInteger) then pass in the ExcelRowNum variable as the number in your write cell activity
I tried running it once before and received errors pertaining to the excel file. There are duplicate headers. I will go ahead and try to decipher it and post a .xaml showing how to do both the write cell and the write range way of doing it.