I am trying to pass data from webpage to Excel. While doing so Excel throws one popUp box ‘Repairs to Excel file’ containing message such as Excel was able to open the file by repairing or removing the unreadable content and then close button appears.
All I have to do is to close that button and then Save content in different file. But I am not able to automate so. While clicking Close button or passing hotkey ‘Enter’. Error comes such as – unable to cast object of type ‘newtonsoft.json.linq.jobject’ to type ‘system.string’.
Please see this pic, I want to automate to press the close button.
Hello, I cant share entire code. but here is a small example.Main.xaml (17.6 KB)
Here I am automating it. Because this kind of Excel file I am not able to use directly.
As a work-around I have clicked save image and then saving this file with different name. Then I am able to do computation on that file. But I would like if you would solve my issue. so I dont have to do save n all…
you said “I am trying to pass data from webpage to Excel. While doing so Excel throws one popUp box ‘Repairs to Excel file’ containing message such as Excel was able to open the file by repairing or removing the unreadable content and then close button appears.”
No not citrix automaiton. I click on button Export to Excel. Then Excel file gets downloaded but when I open that Excel file it asks me Repairs to… I have to click on close button otherwise it wont let me go ahead.
< wnd app=‘excel.exe’ cls=‘bosa_sdm_XL9’ title=‘Repairs to ‘ListofBusinessMessages__EN.xlsx’’ />
Check your selector.
there must be some invalid characters in the selector. Use a wildcard * to remove them.