I have three Excel Workbooks such as WorkBookA, WorkBookB and WorkBookC. Each workbook which has one sheet such as SheetA, SheetB and SheetC.
I want to create a new excel file with SheetA from WorkBookA, SheetB from WorkBookB and SheetC from WorkBookC.
How to do this? Any suggestions..?
This should be very easy.
Grab some code which reads in a particular worksheet into a DataTable
. There are plenty of examples showing how to do this, eg. Excel to DataTable
Create a DataSet
containing the three DataTables
.
Finally, call my "Export to Excel" library to write this DataSet into a real .xlsx file, Export to Excel
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.