Set cell value not working

excel
feature-request
implemented

#1

i want to run a formula in excel
so i gave the formula in a variable in rpa express and am setting the value of the variable in the corresponding cell in excel
am getting an error
“Error executiong SetCellValueAction”

this is the formula - =IF(B1<70,“C”,“A”)
It is not accepting double quotes


#2

@abhaya_jeyar,

The Set Cell Value does not support formulas now.

Please vote for this feature to raise its priority and add more description of your use case. Thanks!


#3

Yeah okay

My usecase is
i want a formula to be pasted in a cell through a variable in RPA Express
For example, say am implementing if formula
=IF(B1<70,“C”,“A”)

The formula needs double quotes. error


#4

hi ,

i have also tried out with the some similar scenario to implement the same but am facing some real hard stopper over there.

Team can u please help me to get out from this… ASAP…

following is the error message i have got…

Error executing SetCellValueAction
  com.workfusion.studio.rpa.recorder.model.playback.PlaybackException: Error executing TemplateAction[templateName=SetCellValueAction.ftl,id=3,name=Optional[SetCellValueAction],parent=1,arguments=ActionArguments[varName=[variable],varType=[java.lang.String],delay=[0],xsi:type=[recorder:SetCellValueAction, recorder:SetCellValueAction],useCellCoordinates=[true],pollingInterval=[300],active=[true],cellCoordinates=[D2],OpenSpreadsheetAction_filePath=[C:\Users\lenovo\Desktop\Book1.xlsx],actionDetails=[(D2)],awaitTimeout=[5000]]]
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:54)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:51)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:147)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:108)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.openqa.selenium.WebDriverException: startup failed:
Script1.groovy: 5: expecting ')', found 'C' @ line 5, column 32.
   excel.setCell("D2","=IF(C1<70,"C","A")");
                                  ^

1 error

Command duration or timeout: 529 milliseconds
Build info: version: '8.5.0-SNAPSHOT', revision: '62044e42df67a8929b97fc00b39c4675384bf699', time: '2017-10-24 12:03:40'
System info: host: 'lenovo-PC', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: com.freedomoss.crowdcontrol.webharvest.selenium.wrapper.RemoteDriverWrapper
Capabilities [{imageSimilarityThreshold=0.8, webdriver.remote.sessionid=f5a49268-e942-4e2b-975e-20c989202fbe, CLOSE_ALL_WINDOWS=false, browserName=universal, takesScreenshot=true, javascriptEnabled=true, SEARCH_ALL_WINDOWS=true, platform=WINDOWS}]
Session ID: f5a49268-e942-4e2b-975e-20c989202fbe
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
      at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:545)
      at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:702)
      at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:750)
      at com.workfusion.rpa.helpers.Excel.setCell(Excel.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrap.invoke(StaticMetaMethodSite.java:133)
      at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:222)
      at Script3.run(Script3.groovy:3)
      at com.workfusion.studio.rpa.recorder.model.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:34)
      at com.workfusion.studio.rpa.recorder.model.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:32)
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:51)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:147)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:108)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
Build info: version: '8.5.0-SNAPSHOT', revision: '62044e42df67a8929b97fc00b39c4675384bf699', time: '2017-10-24 12:03:40'
System info: host: 'lenovo-PC', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: RemoteWebDriver
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:138)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646)
      at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:545)
      at com.workfusion.rpa.helpers.RPA.executeScript(RPA.java:702)
      at com.workfusion.rpa.helpers.RPA.executeGroovyScript(RPA.java:750)
      at com.workfusion.rpa.helpers.Excel.setCell(Excel.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrap.invoke(StaticMetaMethodSite.java:133)
      at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:102)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:222)
      at Script3.run(Script3.groovy:3)
      at com.workfusion.studio.rpa.recorder.model.playback.shell.GroovyShellWrapper.executeScript(GroovyShellWrapper.java:34)
      at com.workfusion.studio.rpa.recorder.model.playback.player.PlaybackContext.executeScript(PlaybackContext.java:65)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.executeBehavior(TemplateAction.java:32)
      at com.workfusion.studio.rpa.recorder.model.playback.flow.StandardControlFlow.execute(StandardControlFlow.java:46)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:27)
      at com.workfusion.studio.rpa.recorder.model.playback.action.template.TemplateAction.execute(TemplateAction.java:14)
      at com.workfusion.studio.rpa.recorder.model.playback.player.ActionPlayer.next(ActionPlayer.java:51)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.playNextAction(PlaybackLogic.java:147)
      at com.workfusion.studio.rpa.recorder.player.PlaybackLogic.run(PlaybackLogic.java:108)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: org.openqa.selenium.WebDriverException: startup failed:
Script1.groovy: 5: expecting ')', found 'C' @ line 5, column 32.
   excel.setCell("D2","=IF(C1<70,"C","A")");
                                  ^

1 error

Build info: version: '8.5.0-SNAPSHOT', revision: '62044e42df67a8929b97fc00b39c4675384bf699', time: '2017-10-24 12:03:40'
System info: host: 'lenovo-PC', ip: '192.168.56.1', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: EventFiringWebDriver
      at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310)
      at org.codehaus.groovy.control.ErrorCollector.addFatalError(ErrorCollector.java:150)
      at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:120)
      at org.codehaus.groovy.control.ErrorCollector.addError(ErrorCollector.java:132)
      at org.codehaus.groovy.control.SourceUnit.addError(SourceUnit.java:360)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.transformCSTIntoAST(AntlrParserPlugin.java:145)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:111)
      at org.codehaus.groovy.control.SourceUnit.parse(SourceUnit.java:237)
      at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:167)
      at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:931)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:593)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:569)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:546)
      at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298)
      at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268)
      at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
      at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:584)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:623)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:594)
      at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:218)
      at com.workfusion.autoit.driver.AutoItDriver.executeScript(AutoItDriver.java:187)
      at com.workfusion.universal.driver.UniversalDriver.executeScript(UniversalDriver.java:139)
      at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:81)
      at com.sun.proxy.$Proxy3.executeScript(Unknown Source)
      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:202)
      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

VIVEK M


#5

Can you use “set active cell” and then enter the formula using “enter keystrokes”?


#6

I believe the Excel actions do not allow including enter keystrokes actions. Yes, it would be very helpful.

Now the solution would be to open the spreadhseet via “launch application” or keystroke win-r + filepath to Excel.exe and then do the editing in the opened spreadsheet. It is much slower than the built-in Exel actions but at leat it should work.