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;

 

posted @ 2017-12-12 13:51  夏天的西瓜君  阅读(210)  评论(0编辑  收藏  举报