could not find the correct fileformattype of the excel using aspose.cells

Last post 02-10-2012, 11:25 AM by Amjad Sahi. 2 replies.
Sort Posts: Previous Next
  •  02-10-2012, 7:17 AM 360722

    could not find the correct fileformattype of the excel using aspose.cells .NET

    Hello,
    I am not able to find the correct FileFormatType of Aspose.Cells for the below url to open the excel workbook.
    http://www.bse-sofia.bg/all_issues/?lang=bg
    I used many fileformattypes like Excel2003, Defaut, Excel97.
    Iam getting the below exception.

    Aspose.Cells.CellsException :  This file's format is not supported or you don't specify a correct format. 

    But when the two Tabdelimited, CSV fileformats are used, we are able to open the workbook. But it contains data not in irregular unknown pattern. 

    Can any one suggest me the correct fileformattype of the above url.


    Thanks in Advance.

    - MounicaS 


     
  •  02-10-2012, 9:52 AM 360773 in reply to 360722

    Re: could not find the correct fileformattype of the excel using aspose.cells

    Hi,

    Thanks for your posting and using Aspose.Cells for .NET

    For .xls file, use FileFormatType.Excel97To2003 enumeration.

    However, often you don't need to specify the format type, Aspose.Cells will detect the correct file format from its extension. So you can use this code.

    Please download and use the latest version: Aspose.Cells for .NET v7.1.0.6

    C#
    Workbook workbook = new Workbook("c:\\yourfile.xls");


    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
     
  •  02-10-2012, 11:25 AM 360802 in reply to 360773

    Re: could not find the correct fileformattype of the excel using aspose.cells

    Hi,

    Also, you may use the static CellsHelper.DetectFileFormat() method to get the file format type for a file, the method takes the file path as an argument.

    Thank you.

    Amjad Sahi
    Support Developer,
    Aspose Sialkot Team
    Contact Us
     
View as RSS news feed in XML