Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
is it possible to use from Range of Excell as an array?

C#
Range[] myrange[100];
myrange[1] = worksheet.get_Range(Convert.ToChar(65) + i.ToString(), Convert.ToChar(65) + i.ToString());


i need to have individual range.

thanks

What I have tried:

i don't know what should i do.



help
Posted
Updated 19-Feb-19 9:01am
v2
Comments
CHill60 19-Feb-19 10:19am    
That code looks like C# not VB.NET and you are declaring an array of ranges whereas you probably want an array of strings to hold the contents of the cells. Try to reword your question so it is clear what your problem is

1 solution

Array of range? Based on your description, my best guess is:

C#
Range tworanges = ExcelApp.Union(worksheet.get_Range("A1:C5"), worksheet.get_Range("D8:G12"));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900