I have to merge the worksheet and worksheet 1 data into a single sheet. I tried the FileStream method to open the file and read the data from there and paste it into the destination worksheet.
Qdv.UserApi.IWbs WBS = es.CurrentVersion.Wbs;
System.Data.DataTable Tasks = WBS.GetFullData(true, new Qdv.UserApi.LocationOfTotals());
// Create a new workbook and worksheet.
SpreadsheetGear.IWorkbook workbook = SpreadsheetGear.Factory.GetWorkbook();
SpreadsheetGear.IWorksheet worksheet = workbook.Worksheets["Sheet1"];
// Get the top left cell for the DataTable.
SpreadsheetGear.IRange range = worksheet.Cells["A1"];
// Copy the DataTable to the worksheet range.
range.CopyFromDataTable(Tasks, SpreadsheetGear.Data.SetDataFlags.None);
//Auto size all worksheet columns which contain data.
worksheet.UsedRange.Columns.AutoFit();
worksheet.Name = "WBS Details";
SpreadsheetGear.IWorkbook WBK = es.GetActiveMinuteWorkbook(true);
SpreadsheetGear.IWorksheet worksheet1 = WBK.Worksheets[0];
worksheet1.Name = "Minutes Details";