SOLVED

Excel interop adds @ sign to formulas

Copper Contributor

Hi,

 

when creating a spreadsheet using Excel interop's and VB.NET I need to add a formula to a cell.

for example the filter formula. I add it as =Filter but when it appears on the spreadsheet it appears as =@Filter

this means that only the cell that I added the formula to will bring back the data in the filter, whereas without the @ it would bring back the array in the corresponding cells.

is there a way of stopping the @ symbol appearing?

Thanks

Gareth

2 Replies
best response confirmed by GarethParry (Copper Contributor)
Solution

I don't have much experience w/ office 365, but it's my understanding there is a range.formula and range.formula2 property - the difference being how excel evaluates the formula (legacy implicit intersection or new dynamic array).

https://docs.microsoft.com/en-us/office/vba/excel/concepts/cells-and-ranges/range-formula-vs-formula...

@JMB17 

 

Hi,

 

thats sorted it

 

thanks

 

Gareth

1 best response

Accepted Solutions
best response confirmed by GarethParry (Copper Contributor)
Solution

I don't have much experience w/ office 365, but it's my understanding there is a range.formula and range.formula2 property - the difference being how excel evaluates the formula (legacy implicit intersection or new dynamic array).

https://docs.microsoft.com/en-us/office/vba/excel/concepts/cells-and-ranges/range-formula-vs-formula...

View solution in original post