Workbook.Open overloaded Method (Stream) for opening csv files and different Excel files

According to the article https://docs.aspose.com/display/cellsnet/Different+Ways+to+Open+Files, one would need to use an overloaded version of the Open method: Workbook.Open Method (Stream, FileFormatType) or Workbook.Open Method (String, FileFormatType), in order to open other type of files such as csv or any version of Excel files from 97 to 2007, which i’m interested in.

I just wanted to make sure that the methods: Workbook.Open Method (Stream) or Workbook.Open Method (String) are actually not testing the type of files (xls, csv…) or the different versions of Excel files (97 to 2007) for us and that indeed we need to do that ourselves explicitly.

What would happen if we were to only use the Workbook.Open Method (Stream) method while providing it csv files or different versions of Excel files (97 to 2007) ?

Looking forward reading you,
Regards, Renaud.

Hi,

Thanks for considering Aspose.

I just wanted to make sure that the methods: Workbook.Open Method (Stream) or Workbook.Open Method (String) are actually not testing the type of files (xls, csv...) or the different versions of Excel files (97 to 2007) for us and that indeed we need to do that ourselves explicitly.

Well, Using Workbook.Opem(String) and Workbook.Open(Stream) methods, you may load .xls file of any file format type (Excel97-Excel2003). Aspose.Cells will adjust automatically file format version (Excel97-Excel2003) for .xls type. No other file format types (.csv, SpreadsheetML (.xml), tabdelimited, txt, Excel2007 xlsx) can be used with these two methods.

For using other file formats (.csv, xml, tabdelimited, txt, xlsx etc.), you have to provide the related FileFormatType member.

Thank you.

Is Workbook.Open(fileStream, FileFormatType.Default) equivalent to Workbook.Open(Stream)?

Sincerely, Renaud.

Hi Renaud,

Thanks for considering Aspose.

Well, Yes, your understanding is right!

Thank you.

Sorry i just updated my post.

Did you mean to answer yes to that question: Is Workbook.Open(fileStream, FileFormatType.Default) equivalent to Workbook.Open(Stream)?


Thanks,
Sincerely, Renaud.

Hi Renaud,

Yes, my answer is luckily the same again. Actually when you use Workbook.Open(Stream)/ Workbook.Open(String) method, Aspose.Cells will load the excel file (.xls file) using FileFormatType.Excel2003 and FileFormatType.Default also refers to Excel2003 file format. Furthermore, there is no major difference b/w Excel97-Excel2003 file formats as all are BIFF8 or greater file format types.

Thank you.

Thanks for your answers.



Sincerely, Renaud