Error Saving when combining Aspose.Words and Aspose.Cells

Last post 01-05-2012, 1:09 AM by Ove_Jo. 2 replies.
Sort Posts: Previous Next
  •  01-04-2012, 2:27 PM 353079

    Error Saving when combining Aspose.Words and Aspose.Cells .NET

    Attachment: Present (inaccessible)

     

    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 

     

     
  •  01-05-2012, 12:21 AM 353160 in reply to 353079

    Re: Error Saving when combining Aspose.Words and Aspose.Cells

    Hi,

    Please use full naming to get rid of ambiguous reference.

    i.e

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


    Many Thanks and Kind Regards,

    Shakeel Faiz
    Support Developer
    Aspose Sialkot Team
    Contact Us
    Aspose - The .NET and Java Component Publisher

    Keep in touch! We're on Twitter and Facebook
     
  •  01-05-2012, 1:09 AM 353177 in reply to 353160

    Re: Error Saving when combining Aspose.Words and Aspose.Cells

    Of course!!

    My  test-program now works fine...

    Thank you!

     

     
View as RSS news feed in XML