Hi,
I'm usining Dynamics CRM 365 online and I need to read an Excel file attached, but I receive this message:"System.IO.FileFormatException: 'File contains corrupted data.'"
This is the code:
string documentBody = data.ReadExcelFile(id);
byte[] byteArray = Encoding.UTF8.GetBytes(documentBody);
Stream stream = new MemoryStream(byteArray);
using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(stream, false)) <-- ERROR LINE
{
WorkbookPart workbookPart = spreadsheetDocument.WorkbookPart;
someone had the same problem?
thanks in advance
Horacio






