My application under test is a desktop app for finance
I need to copy a range of data from an xlsx file to the clipboard and then paste this into my app, i.e. I do not need to read the data into TestComplete e.g. in sheet2 of test.xlsx select and copy a2:j30
I can do this by opening Excel, selecting the data and then copying this into my app
This is fine my dev setup, but in my Test environment the servers do not have Excel installed
All the Excel examples I have seen seem to be for individual cells rather than a range of cells.
The link below suggest using COM, but the sample is only for reading the data.
Is what I am trying to do possible, and if so can anyone give some pointers?
Solved! Go to Solution.
you would need to scrip that portion, and create a helper function to "copy" the values from the selected cell ranges.
something like a for loop restricted by the length set by the user dictating the rows to iterate over, appending each cell value to a list or dictionary? I think would be the simplest way to reuse the values again later in another application as your end use would.
Are you testing copy/paste function in your app or are you just trying to get the data into your app some way? I ask because sometimes the easy way for a user to perform the task and the easy way for TestComplete to perform the task are two different things. What is your actual goal here?
No Excel license on your test environment will be a problem ..
You cannot have data in csv instead of xls(x) ?
If you can, csv are text file so very easy to manipulate without no needs of license, components and so on ..
Un sourire et ça repart
Hi,
> the servers do not have Excel installed
Consider Excel object provided by TestComplete which does not require Excel application to be present on the box.
I am trying to replicate how our customers use our app. Typically they will receive data in an Excel spreadsheet and can either import this directly or can copy and paste some of the data.
I have looked at Excel Object, but as I said in my original post I don't see how to copy a range of cells rather than an individual one.
you would need to scrip that portion, and create a helper function to "copy" the values from the selected cell ranges.
something like a for loop restricted by the length set by the user dictating the rows to iterate over, appending each cell value to a list or dictionary? I think would be the simplest way to reuse the values again later in another application as your end use would.
Subject | Author | Latest Post |
---|---|---|