delphi string 到excel
function bytetoexcel(excelContent, filepath: string);
begin
var P: PChar; B: array of Byte; imgstream: TBytesStream; ps: TMemoryStream; ss: TStringStream; begin ss := TStringStream.create(excelContent); ps := TMemoryStream.create; try DecodeStream(ss, ps); ps.Position := 0; ps.SaveToFile(filepath); finally ps.free; ss.Free; cxSetSplashVisibility(False, ''); end;
end;