-3

In my excel sheet there are many cells filled with some information. e.g sheet1

**Osdata**  
C:\Program Files (x86)  
Z:\Program Files\Google\Update  <br>
W:\Program Files (x86)\Internet Explorer\es-ES  <br>
C:\Program Files (x86)  <br>
q:\Program Files\Google\Update  <br>
W:\Program Files (x86)\Internet Explorer\es-ES  <br>
C:\Program Files (x86)  <br>
Z:\Program Files\Google\Update  <br>
P:\Program Files (x86)\Internet Explorer\es-ES  <br>
C:\Program Files (x86)  <br>
Z:\Program Files\Google\Update  <br>
X:\Program Files (x86)\Internet Explorer\es-ES  <br>
C:\Program Files (x86)  <br>
F:\Program Files\Google\Update  <br>
W:\Program Files (x86)\Internet Explorer\es-ES  <br>
**Files**   <br>
D:\MyFolder\Work    <br>
D:\PDF\Year\2016    <br>
E:\Games\Report\Tri <br>
E:\all\Reports\Like\12\P    <br>
D:\MyFolder\Work\32\WERT    <br>
D:\PDF\Year\2016\RET\12\ER  <br>
E:\Games\Report\Tri <br>
E:\all\Reports\Like <br>
D:\MyFolder\Work    <br>
D:\PDF\Year\2016    <br>
E:\Games\Report\Tri <br>
E:\all\Reports\Like <br>
D:\MyFolder\Work    <br>
D:\PDF\Year\2016    <br>
E:\Games\Report\Tri <br>
E:\all\Reports\Like <br>
**OthersData**  <br>
\\Games\AllGames\Data   <br>
\\Report\New\AllNew\Report  <br>
\\Re12\FERT\Like    <br>

now i want copy Osdata and Othersdata to sheet2. these all are sample data.

Sagar Trivedi
  • 47
  • 1
  • 11

2 Answers2

0

Below links might be helpful to give you a start

How to copy excel worksheets Into another excel workbook without opening the excel file in c# winforms?

https://msdn.microsoft.com/en-us/library/ms178800.aspx

Community
  • 1
  • 1
  • Excel.Range from = workSheet.get_Range("A1","A100"); Excel.Range to = newWorksheet.get_Range("A1","A100"); from.Copy(to); this is coping the specific range , .i want to copy only Osdata and Othersdata – Sagar Trivedi Apr 08 '16 at 19:02
0

Okay, First of all you need to read the current excel data. use this link Read Data From Excel file using CSharp

Then, you will write the data you just read into another excel file. use this link Export Data to excel file

Hope this will help.

Community
  • 1
  • 1
Amr Deif
  • 103
  • 1
  • 14