[英]Copy excel sheet data to another sheet using c#
在我的 excel 表中有許多填充了一些信息的單元格。 例如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>
現在我想將 Osdata 和 Othersdata 復制到 sheet2。 這些都是樣本數據。
好的,首先你需要讀取當前的excel數據。 使用此鏈接使用 CSharp 從 Excel 文件讀取數據
然后,您將剛剛讀取的數據寫入另一個excel文件。 使用此鏈接將數據導出到 excel 文件
希望這會有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.