Hi all,
I created a Winbatch Script which fills data into an Excel => So far so good and working fine
I'm doing this while counting row/column.
Now I have to put a formula into cells of a specific column but "cells(1, 1)" doesn't work while "A1" is expected.
e.g. I have to fill in a formula "=COUNTIF(E2:N2;"X")" after I added 10 Columns after starting on column 5 (aka => E)
Any idea hwo I can manage this??
Regards and thanks,
joerg
Perhaps start with the Tech Database. Here is link to but one of many Excel examples there:
http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~Excel/Samples~from~Users+Auto~Sum~Two~Columns~In~Excel.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/OLE~COM~ADO~CDO~ADSI~LDAP/OLE~with~Excel/Samples~from~Users+Auto~Sum~Two~Columns~In~Excel.txt)
Here is the reference for the FormulaR1C1 property:
https://msdn.microsoft.com/en-us/library/office/ff823188.aspx?f=255&MSPPError=-2147217396 (https://msdn.microsoft.com/en-us/library/office/ff823188.aspx?f=255&MSPPError=-2147217396)
Here is the reference for the Forumla property:
https://msdn.microsoft.com/en-us/library/office/ff838835.aspx (https://msdn.microsoft.com/en-us/library/office/ff838835.aspx)
Not to intercede, but are you trying to include the Countif() formula in your code, or populate cells in a template where the formula is expected to execute. If the former, look into .FormulaR1C1 .