We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error Saving when combining Aspose.Words and Aspose.Cells

When I'm using both Aspose.Words and Aspose.Cells I have a problem using .Save....

Bits of code :

using Aspose.Cells;
using Aspose.Words;

Aspose.Cells.License license = new Aspose.Cells.License();
license.SetLicense(@"Aspose.Total.lic");
Aspose.Cells.Workbook wb = new Workbook();
Worksheet sheet = wb.Worksheets[0];
Cell cell = sheet.Cells["A1"];
cell.PutValue("Hello World 2 !");
wb.Save("c:\\ASPOSE\\MyBook.xls", SaveFormat.Excel97To2003);v

Error :

'SaveFormat' is an ambiguous reference between 'Aspose.Cells.SaveFormat' and 'Aspose.Words.SaveFormat

Hi,

Please use full naming to get rid of ambiguous reference.

i.e

wb.Save(“c:\ASPOSE\MyBook.xls”, Aspose.Cells.SaveFormat.Excel97To2003);

Of course!!

My test-program now works fine...

Thank you!