I am attempting to use this line of code from a very old post:
This doesn't seem to work. The Test Complete type ahead only contains Cell, CelCount and Row Count. I simply want to delete one row or a range of rows from an excel file.
Any assistance is appreciated.
What is it that you are trying to do with the data that ends up with you deleting it? Best practice is to not delete your test data. Perhaps we can find you another way to run the test without doing that.
Actually the task is a little bit trickier then that. I have three excel files. I need to manipulate each one, for example
Excel1 - delete the first five rows and the last row of data, then copy all data in three columns and paste into Excel3.
Excel 2 - copy data from three columns and then paste into Excel3
This kind of task was doable in UFT, but now that I am using Test Complete, it's a lot different.
Any help is appreciated.
Data from Excel 1 and Excel 2 come from outside data sources. Excel 3 contains formulas which will compute the information from Excel 1 and Excel 2. The data itself is not actually important, I just need to delete specific rows from the spreadsheet.
> This doesn't seem to work
If https://stackoverflow.com/questions/31878154/delete-rows-x-to-y-in-on-a-specific-excel-worksheet does not help, could you elaborate what does 'This doesn't seem to work' mean?
I found that I need to access the excel com directly to at least delete a row. using this
wkbExported = appExcel.Workbooks.Open("\\\\network\\\\folder1\\\\folder2\\\\folder3\\\\datafile_20210113.csv");
or to delete columns using this:
Is there a paste option when copying from one file to another? I need to paste a large amount of data from one spreadsheet to another. Please advise.
> Is there a paste option
And the whole Excel COM documentation.
Thanks to everyone for participating in this discussion!
@KJ Does the advice help?