title: Delphi, set Number Format by Open Office API
body: <p>Is it possible to set number format of cell by Open Office API?<br>
  I am exporting some data into Open office calc and I want use user defined format. </p>
  
  <p>Below is example of my code:</p>
  
  <pre><code>    try
        AOpenOffice := GetActiveOleObject('com.sun.star.ServiceManager');
      except
        on E: Exception do
        begin
          AOpenOffice := CreateOleObject('com.sun.star.ServiceManager');
        end;
      end;
      AStarDesktop := AOpenOffice.createInstance('com.sun.star.frame.Desktop');
      AFileProp := varArrayCreate([0, -1], varVariant);
      AMyDoc := AStarDesktop.LoadComponentFromURL('private:factory/scalc', '_blank', 0, AFileProp);
      AAllSheets := AMyDoc.Sheets;
      AMySheet := AAllSheets.getByIndex(0);
  
      for AColumn := 0 to 9 do begin
        for ARow := 1 to 10 do begin
          ARange := Chr(ord('A') + AColumn) + IntToStr(ARow);
          AMyCell := AMySheet.getCellRangeByName(ARange);
          AValue := (AColumn + 1) * ARow * 1000;
          AMyCell.setFormula(AValue);
          // ? TODO set number format
        end;
      end;
  </code></pre>
  
  <p>Thank you for any idea.</p>