Asiign a formula to excel

Posted by Aleramo on 18-Mar-2016 04:05

Hello to everybody!

I have a problem, i am trying to assign a formula to a cell in excel, i read on this link

community.progress.com/.../8040

that i have to use the command:

w-formula = SUBSTITUTE ("=&1", wp-formula).

ch_Worksheet_Dat:Cells(wp-row,wp-col):NumberFormat = 0.
ch_Worksheet_Dat:Cells(wp-row,wp-col):Formula   = w-formula.

but when i go to the excel file, i see the cell is wrong like in the image below, to solve the problem i have to go in the fill in of the Formula, to push Enter and everything goes fine.

Where do i wrong while i assign the formula to the cell? Have i to give some more statements?

All Replies

Posted by Jean Richert on 21-Mar-2016 08:23

Anyone following this forum may have working experience with assigning a formula to a cell in Excel and could share and assist Aleramo?

Posted by James Palmer on 21-Mar-2016 08:29

Have you tried doing it manually, recording it as a macro and then looking at the VB code to see what that does? I usually find that's a good starting point.

Posted by Brian K. Maher on 21-Mar-2016 08:29

There is no image attached so we don't see what is wrong.

Posted by Aleramo on 22-Mar-2016 03:11

Thank you, i solved, i had to write in english "sum" and no "somma" like italian, Excel show me "somma" but it wants "sum", probably excel has two levels, one for the user (monitor) and one invisible to work.

How can i sign this thread as solved?

Thank you to everybody.

This thread is closed