Hola
Estoy con firebird, delphi6, tengo un campo blob donde almaceno las imagenes, y quiero guardarlas cada una en una celda de excel.
el código es el siguiente y funciona:
ExcelApplication1 es obviamente un TExcelApplication.
En el ClientDataSet hay un campo llamado IMAGEN, de tipo Blob
Código Delphi
[-]
procedure TForm1.EjemploExcel;
var
WorkBk : _WorkBook;
WorkSheet : _WorkSheet;
begin
ExcelApplication1.Connect;
ExcelApplication1.Workbooks.Add(xlWBatWorkSheet,0);
WorkBk := ExcelApplication1.WorkBooks.Item[1];
WorkSheet := WorkBk.WorkSheets.Get_Item(1) as _WorkSheet;
WorkSheet.Name := 'documento';
fila := 4;
ClientDataSet1.First;
while not ClientDataSet1.Eof do
begin
inc(fila);
WorkSheet.Range['A'+IntToStr(fila),'A'+IntToStr(fila)].Value:= ClientDataSet1.FieldByName('FACTURA').AsString;
WorkSheet.Range['B'+IntToStr(fila),'B'+IntToStr(fila)].Value:= ClientDataSet1.FieldByName('CONCEPTO').AsString;
WorkSheet.Range['C'+IntToStr(fila),'C'+IntToStr(fila)].Value:= ClientDataSet1.FieldByName('Precio').AsFloat;
WorkSheet.Range['D'+IntToStr(fila),'D'+IntToStr(fila)].Value:= ClientDataSet1.FieldByName('TIPO').AsString;
ClientDataSet1.Next;
end;
ExcelApplication1.Visible[0]:=true;
ExcelApplication1.Disconnect;
end;
a ver si alguien sabe como hacer esto, estoy algo perdido, he visto algún ejemplo en el foro, pero son imagenes desde archivo y no se guardan en una celda sino en el libro.