TMSFNCGrid LoadFromStream

Hi

I'm trying to use the following code:

procedure TForm5.Button4Click(Sender: TObject);
var
  mStream : TMemoryStream;
begin
  mSTream := TMemoryStream.Create;
  
  IdHTTP1.Request.ContentType := 'application/vnd.ms-excel';
  IdHTTP1.Get('http://schochinformatik.nothing2easy.ch/xlsforms/SINA_AsXLS_NoPic.xls', mStream);
  mStream.Position := 0;
  TMSFNCGrid1.LoadFromStream(mStream);
  
  mStream.Free;
end;

The http-request works, but when I call LoadFromStream, I get an EConvertError, and the grid ist not updating. When I save the stream to file, and load the file into the grid everithing is working.

Any clues?

Joern

I see this concerns an XLS file and the LoadFromStream() method is not used for handling .XLS files.

For handling .XLS files, you need to use the component TTMSFNCGridExcelIO connected to the TTMSFNCGrid.