Hi All,
I am processing an excel file using C#.
I am using excel concatenate formula that includes comma and single quotes.
But everytime it throws the error - Exception from HRESULT: 0x800A03EC.
This is the formula:
Sht1.Range["U2"].Formula = "=CONCATENATE(A2,\",\",\"TO_DATE(\",B2,\",'dd-mm-yyyy')\",\",\",C2,\",\",D2,\",\",E2,\",\"F2,\",\",G2,\",\",)";
Funny that when I use the concatenate function without so much complicacy, it works, like:
Sht1.Range["U2"].Formula = "=CONCATENATE(A2,B2,C2,D2,E2,F2,G2)";
The output requires comma and single quotes.
I think the syntax in first formula is not right. But I am not able to find it out. Is there any other way to write such a formula?
Any help?
What I have tried:
Simple formula works but when comma and backslash are used, it gives error.