As you can see from the error in the image, I am currently reading a csv file instead of an Excel file in the Read range section.
・What I’m doing now
I created a variable called ExcelWk in the output of external Excel application scope.
And then, I write ExcelWk.GetSheets(0) at sheet information in Read Range. However, it failed.
・What I want to do
I would like to reference Excel file. so is there any way to read an Excel file opened with an external Excel application scope?
・Why not use dataTable?
Initially, I used the internal Excel Application Scope to get all the CSV data, and then I wrote the data into Excel. However, since the amount of data to be imported was huge and an error occurred in the middle of the process. So I am now using the method of opening the csv files one by one and writing them to Excel.
Yeah it is possible but try with READ RANGE from workbook activities instead of excel based activity
Search as workbook in activity panel and under that Look for read range
Though you got the sheet name from excel scope save it to a variable and use this write range outside the excel scope
In that read range you can mention that sheet name
And even for writing use WRITE RANGE from workbook instead of excel activities if the number of data is huge
Thank you very much for your solution.
I followed your advice and was able to successfully reference the file.
Then I checked it works, but occasionally I get a timeout or an error message saying “Connection to the cloud server has been lost” at the Write Range activity.
In the past, you have answered in the following link that it is better to use Excel Application to handle heavy data in Write Range, but as you know, this method is not available for me.
Is there any other better way?
I am looking forward to your reply.
That’s absolutely right
I was even using excel based activities but I observed lot of stability with workbook activities in its later version
So that’s why I suggested based on output I saw
try using a KILL PROCESS activity and mention as “EXCEL” in ProcessName propert and then use Write range activity
And try to keep the above set of activities inside a TRY block of try catch activity
So that even it fails it will go to CATCH block where we can use again a kill process as mentioned above and a write range activity followed by that.
This will ensure even if the activity fails it will get retried for one time atleast
If we want to retry multiple times
Use a RETRY SCOPE activity and mention the activity kill process and write range from workbook in ACTION block and leave the condition empty and mention the number of retries we want in property panel
Hope this would help you
Thank you for your advice.
I made the corrections as you suggested above, and it works without any errors, and I am going to see how it goes.
Thank you very much for the best advice.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.