J jiabeyondy Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-10 #1 我用delphi编程向excel表格中输入数据,因为有些数据要突出显示,需在要突出显示的单元格中填充颜色,不知如何来实现?
W wangzai6280 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-18 #2 procedure TForm1.Button1Click(Sender: TObject); begin ExcelApp := CreateOleObject('Excel.application'); ExcelApp.Visible := True; ExcelApp.Workbooks.Add; ExcelSheet := ExcelApp.Workbooks[1].Sheets['Sheet1']; ExcelSheet.Range['A1'].Interior.ColorIndex := 3; //红色 end;
procedure TForm1.Button1Click(Sender: TObject); begin ExcelApp := CreateOleObject('Excel.application'); ExcelApp.Visible := True; ExcelApp.Workbooks.Add; ExcelSheet := ExcelApp.Workbooks[1].Sheets['Sheet1']; ExcelSheet.Range['A1'].Interior.ColorIndex := 3; //红色 end;