alucard Posted January 17, 2017 Share Posted January 17, 2017 Excel' aktarım yapmak istiyorum. Herzaman kullandığım kodu kullanıyorum ama bu hatayı veriyor. Kullandığım kod: uses ComObj,ActiveX procedure TForm2.UniBitBtn21Click(Sender: TObject); var excel,Workbook,sheet: Variant; a,i:integer; begin excel:= CreateOleObject('Excel.Application'); Workbook:=EXCEL.WORKBOOKS.ADD; sheet := Workbook.WORKSHEETS[1] ; TRY for i := 1 to IBQEgitmAlanlar.FieldCount-1 do begin sheet.CELLS[1,i] := IBQEgitmAlanlar.Fields[i-1].FieldName ; IBQEgitmAlanlar.First; for a := 2 to IBQEgitmAlanlar.RecordCount+1 do begin sheet.CELLS[a,i] := IBQEgitmAlanlar.FieldByName(IBQEgitmAlanlar.Fields[i-1].FieldName).asstring ; //showmessage(dtTable.FieldByName(dtTable.Fields[1].FieldName).Value) ; IBQEgitmAlanlar.Next; end; end; EXCEL.VISIBLE := TRUE; Except ON E:EXCEPTION DO BEGIN ShowMessage(E.Message); CLOSE; END; END; //excel.close; end; Link to comment Share on other sites More sharing options...
mehmet07 Posted January 17, 2017 Share Posted January 17, 2017 Bu sekilde unigui icerisinde excel kullanamazsiniz. Masaustunde calisir ama unigui de kod is gormez. Forumda excel aktarimlari ile iligili ornekler mevcuttu. suan zamanim olmadigi icin bakamadim. Link to comment Share on other sites More sharing options...
alucard Posted January 17, 2017 Author Share Posted January 17, 2017 başka bir projede kullandım hocam çalışıyorda. ama bunda çalışmadı. neyi yanlış yaptığımıda bulamadım Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted January 17, 2017 Share Posted January 17, 2017 Servermodule.AutoCoinitialize True mu? Link to comment Share on other sites More sharing options...
alucard Posted January 17, 2017 Author Share Posted January 17, 2017 true hocam Link to comment Share on other sites More sharing options...
alucard Posted January 17, 2017 Author Share Posted January 17, 2017 Kod boş bir projede çalışıyor. Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted January 17, 2017 Administrators Share Posted January 17, 2017 Bunun icin Excelin kurulu olmasi lazim. Ancak bu yontem genel olarak uygun degildir. Link to comment Share on other sites More sharing options...
iyarar Posted January 18, 2017 Share Posted January 18, 2017 TMS Flexcel kullanmanızı tavsiye ediyorum. sorunsuz çalışıyor Link to comment Share on other sites More sharing options...
alucard Posted January 20, 2017 Author Share Posted January 20, 2017 TMS Flexcel kullanmanızı tavsiye ediyorum. sorunsuz çalışıyor hocam bu component ücretli herhalde. ben ücretsiz bir şekilde çözüm yolu arıyorum. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now