Reading an Excel file produces an exception "You want to put a string longer than 32K" in .NET

hi

i am facing one issue while accessing code in bold letters.
Code:
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook();
wb.Open(pFilepath, FileFormatType.TabDelimited);
Exception:
ThumbnailLibrary.ThumbnailsHelper.CreateXLSThumbnail( String pFilepath, String pTargetFile ) Exception Aspose.Cells.CellsException: You want to put a string longer than 32K to Cell A47. MS Excel only allows to put a string shorter than 32K to a Cell.
at Aspose.Cells.Cell.PutValue(String stringValue)
at ྵ.☏.☑(Cell ೵, StringBuilder ☒, Boolean ☓, String Ꮞ, String ☐, String[] ᰑ)
at ྵ.☏.ក(StreamReader ℽ, Cells ໭, Char ☔, Boolean ☓)
at ྵ.☏.ក(String ݤ, Cells ໭, Char ☔, Boolean ☓)
at Aspose.Cells.Workbook.Open(String fileName, FileFormatType type)
at ThumbnailLibrary.ThumbnailsHelper.CreateXLSThumbnail(String pFilepath, String pTargetFile)

attached are the list of file, with which i am facing issue.

plz find a solution ASAP.

thanks
chandra

Hi,

Please change your code to:

Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook();
wb.Open(pFilepath, FileFormatType.Default);

Since your template files are native excel files (*.xls) and not tab delimited files, so you should use the above code to open/load the file.

Thank you.

thanks for quick reply. It worked.

thanks
chandra