Jump to content
Sign in to follow this  
tenken

_ExcelCopy ()

Recommended Posts

tenken

Hi all,

I'm trying to select multiple cells with this function and it doesn't work.

May be my syntax is wrong :

_ExcelCopy($oExcel, "C1;D1;H1;L1")

So I'm trying to select different cells one by one, and I can't.

In opposite, this syntax works perfectly :

_ExcelCopy($oExcel, "C1:L1")

but that's not that I want to do ^^

Thanks

Edited by tenken

Share this post


Link to post
Share on other sites
Kerros

_ExcelCopy is going to either copy a cell or a range of cells with the appropriate syntax.

so you could do an:

_ExcelCopy($oExcel, C1:D1)

_ExcelCopy($oExcel, H1)

_ExcelCopy($oExcel, L1)

as those can be made into ranges, or copy each cell individually.

You could also write a custom function based on what is in the ExcelCom_UDF to select cells based on what is in an array or something if you really want to copy all the cells at once.

Kerros


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites
tenken

_ExcelCopy is going to either copy a cell or a range of cells with the appropriate syntax.

so you could do an:

_ExcelCopy($oExcel, C1:D1)

_ExcelCopy($oExcel, H1)

_ExcelCopy($oExcel, L1)

as those can be made into ranges, or copy each cell individually.

You could also write a custom function based on what is in the ExcelCom_UDF to select cells based on what is in an array or something if you really want to copy all the cells at once.

Kerros

Thanks a lot for your help; but there's something strange :

I had retry to use this syntax

_ExcelCopy($oExcel, "C1;D1;H1;L1")
and it worked, the script paste the cells, but crash just after that :s

I don't understand where the problem is ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×