Arsip: cara ngerubah data di excel lewat delphi gimana

 
user image
more 13 years ago

lela

cara ngerubah data di excel lewat delphi gimana, mohon bantuannya banget
user image
more 13 years ago

lela

tolong ada contohnya kalo bisa,
user image
more 13 years ago

mas_kofa


var vkodemk:string;
    bposting:boolean;
    vsks:string;
function Convert_To_Excel(namatable,namafileexcel:string):integer;
var i,j:integer;
source:TTable;
Dest:TF1Book;
countfield,countrec:integer;
begin
try
Source:=TTable.create(application);
Source.databasename:=extractfilepath(namatable);
Source.tablename:=extractfilename(namatable);
Source.Active:=true;
Dest:=TF1Book.create(application);
countfield:=Source.fieldcount;
countrec:=Source.RecordCount;
if countrec>16382 then
begin
result:=-1;
exit;
end;
for i:=1 to countfield+1 do
begin
     if i=1 then Dest.TextRC[1,i]:='No'
        else Dest.TextRC[1,i]:=Source.Fields[i-2].DisplayName;
     {pengecekan lebar field}
     if i=1 then
        begin
             Dest.ColWidth[i]:=length(Source.fields[i].displayname)256
        end
     else if length(Source.fields[i-2].displayname) > Source.fields[i-2].datasize
        then Dest.ColWidth[i]:=length(Source.fields[i-2].displayname) 256
     else Dest.ColWidth[i]:=Source.fields[i-2].datasize*256+300;
end;
Source.first;
for j:=1 to countrec do
begin
for i:=1 to countfield+1 do
begin
{pencetakan record}
if i=1 then Dest.numberRC[j+2,i]:=j
else if i=2 then Dest.TextRC[j+2,i]:=copy(Source.Fields[i-2].text,1,2)+'.'+
copy(Source.Fields[i-2].text,3,2)+'.'+copy(Source.Fields[i-2].text,5,3)
else Dest.TextRC[j+2,i]:=Source.Fields[i-2].Text
end;
Source.next;
application.ProcessMessages;
end;
Dest.write(namafileexcel,F1FileExcel5);
Source.free;
Dest.free;
except
end;
result:=0;
end;
user image
more 13 years ago

lela

HEHEHEH, nuhun ya, aku mo nyobain ah, tapi kalo ada yang salah ntar bantuin lagi ya
user image
more 13 years ago

chandra

gimana caranya kalo mau nulis text ke excel? misal saya mau nulis cell a1='ini' cell a2='ibu' cell a3='budi' thanx
user image
more 13 years ago

donald

@lela: cara ngerubah data di excel lewat delphi gimana, mohon bantuannya banget
kok kulo gak ngerti ya apa yang dimaksud ama @lela,tolong donk diperjelas ato contoh file dalam bentuk excelnya,krn saya juga tertarik nih dengan pembahasan perubahan data excel melalui delphi
user image
more 13 years ago

lela

misalkan di excel data pada sel a2=4, nah kita pengen melalui delphi di excel itu sel a2 datanya berubah jadi 5, itu gimana sih carane
more ...
  • Pages:
  • 1
Share to
Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com