Click here to Skip to main content
15,887,386 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All

My excel data is line below

General Server Information										
Server Name	World Wide Name	                Operating System
T3BRDC7PDBP01	T3BRDC7PDBP01.PBI.GLOBAL.PVT	Windows 2k12 R2 STD		
BRDC7-CMTAPPP01	BRDC7-CMTAPPP01.PBI.GLOBAL.PVT	Windows 2k12 R2 STD
BRDC7-CMTWBPP1	BRDC7-CMTWBPP1.PBI.GLOBAL.PVT	Windows 2k12 R2 STD
BRDC7-CMTWBPP2	BRDC7-CMTWBPP2.PBI.GLOBAL.PVT	Windows 2k12 R2 STD		
										
Hardware Details										
Server Name	Server Make	Server Model	
T3BRDC7PDBP01	DELL	        R730


Now i want to read the cell value and copy the data only from "General Server Information" to "Hardware Details"

Please tell me how to do this

What I have tried:

Now only able to copy data from one workbook sheet to other workbook sheet within range. but have to apply the above filter.

Excel.Range from = srcworkSheet.Range["B41:D4600"];
Excel.Range to = destworkSheet.Range["B5:D500"];
from.Copy(to);
Posted
Updated 18-Feb-16 4:51am
v3

1 solution

Google is your friend: "excel c# tutorial copy range".
The ranges do not match.
How about only giving the top-left cell for the destination as shown in various Google hits above?
BTW: 56 question in about 560 days - "not bad"... Have you ever considered investigating yourself the tiniest problem before hitting the CP submit button?
Regards
Andi
 
Share this answer
 
v2
Comments
Black_Rose 19-Feb-16 6:04am    
i use to come to CP only after search in google. if u don't want to help that's fine.
Andreas Gieriet 19-Feb-16 6:47am    
Please read my text carefully - not only the criticism.
If you enter the text above in Google (without quotes) you get the answers to your question. And I repeated the solution: give the top-left cell only for the destination.
My comment on wondering why you ask every 10 day a question in average might be a trigger for you to re-think how you seek for answers. You should develop the ability to search the internet for decent answers...
Regards
Andi
Black_Rose 19-Feb-16 7:08am    
See u gave that already i did. what i wanted you havn't got and which your provided support dosn't cover. i want to copy the cell's between two text. now the rows in between them can be added/removed later. In the sample it's mentioned 4 rows,but it can be 3 or 10 later
I asked how to do this.
Andreas Gieriet 19-Feb-16 7:41am    
So, in that case, I don't get what you want.
What is the expected outcome after your operation?
Can you give for the input data the respective output data?
What do you mean by "the above filter"? Do you mean below?
Regards
Andi

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