Hi,
Could you please indicate why the following code doesn't work with the attached xls file ? (attached file has been generated via Aspose, and opening then saving the file in Excel fixes the issue)
using System;
using System.Collections.Generic;
using System.Text;
using Aspose.Cells;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
ProdBook();
}
private static void ProdBook()
{
//new Aspose.Cells.License().SetLicense("Aspose.Total.lic");
Workbook book = new Workbook();
Workbook excelChild1 = new Workbook();
excelChild1.Open(@"C:\a.xls", FileFormatType.Excel2003);
foreach (Worksheet ws in excelChild1.Worksheets)
{
book.Worksheets.Add(SheetType.Worksheet);
book.Worksheets[book.Worksheets.Count - 1].Copy(ws);
book.Worksheets[book.Worksheets.Count - 1].Name = ws.Name;
}
book.Worksheets.RemoveAt(0);
book.Save("C:\\book.xls", FileFormatType.Excel2003);
}
}
}