Einzelnen Beitrag anzeigen

Benutzerbild von Chemiker
Chemiker

Registriert seit: 14. Aug 2005
1.858 Beiträge
 
Delphi 11 Alexandria
 
#10

Re: Excel Problem mit OleObject

  Alt 20. Aug 2007, 19:34
Hallo ibp,

es ist so bei TAdvStringGrid das man beim Abspeichern der xls – Datei die Formatierung zwingend auf das Englische – Format einstellen muss.
Ich vermute, wenn ich das bisher richtig verstanden habe, dass die Formatierung aus dem Grid heraus nicht in Ordnung ist.

Siehe

Delphi-Quellcode:
procedure TMainForm.AdvGridExcelIO1CellFormat(Sender: TAdvStringGrid;
  const GridCol, GridRow, XlsCol, XlsRow: Integer; const Value: WideString;
  var Format: TFlxFormat);
begin
  if (GridCol = 3) then Format.Format:='$ #,##0';
end;
Zitat:
The string you need to write in "Format.Format" is a standard Excel formatting string. It is important to note that this string must be in ENGLISH format, even if your Windows or Excel is not in English.
Bis bald Chemiker
wer gesund ist hat 1000 wünsche wer krank ist nur einen.
  Mit Zitat antworten Zitat