TTMSFNCGridExcelIO - fixed rows formats and cell borders / alignment

Hi!
TTMSFNCGridExcelIO does not export fixed rows cells format unless they are explicitly set at cell level. If they rely on Appearance.FixedLayout.Fill/Font/etc, they are not exported.

The same situation when HorzAlignment relies on Columns[n].HorzAlignment. It's not exported unless I set HorzAlignment at Cell level.

I also have a problem with the borders. Although I have Options.Borders.CellBorders = bNone, all exported cells have borders (even with Options.ExportHardBorders := False; - I don't know exactly what is meant by hard borders, but I tried it to check if it would export without them).

Hi,

Did you set TMSFNCGridExcelIO.Options.ExportCellProperties to True, we have tested the HorAlignment at column level and this gets exported correctly. We have seen an issue with exporting borders, and are currently investigating this here. Can you provide a small sample?

Yes.

Under VCL, Ok. My project uses Web Core, and I had to manually set some properties to get exported:

  // Setting properties at cell level
  for nCol := 1 to grd.TotalColCount - 1 do begin
    grd.Colors[nCol, 0] := grd.Appearance.FixedLayout.Fill.Color;
    grd.FontColors[nCol, 0] := grd.Appearance.FixedLayout.Font.Color;
    grd.FontStyles[nCol, 0] := grd.Appearance.FixedLayout.Font.Style;
    grd.FontSizes[nCol, 0] := grd.Appearance.FixedLayout.Font.Size;
    grd.FontNames[nCol, 0] := grd.Appearance.FixedLayout.Font.Name;
    for nLin := 0 to grd.TotalRowCount - 1 do
      grd.HorzAlignments[nCol, nLin] := grd.Columns[nCol].HorzAlignment;
  end;

...

  xcelio.Options.ExportCellFormats := True;
  xcelio.Options.ExportCellProperties := True;
  xcelio.Options.ExportCellSizes := True;
  xcelio.Options.ExportImages := True;
  xcelio.Options.ExportReadonlyCellsAsLocked := True;
  xcelio.Options.ExportHardBorders := False;
  xcelio.Options.ExportHTMLTags := True;
  xcelio.Options.ExportSummaryRowsBelowDetail := True;
  xcelio.Options.ExportFormulas := True;
  xcelio.Options.ExportCellMargins := True;
  xcelio.Options.ExportWordWrapped := False;
  xcelio.Options.UseExcelStandardColorPalette := False;

geee ... sorry ... Now that I read the post again I noticed I mentioned Web Core, but that deserves a fix.

That pre-export code I sent comes from an XData service.
It's a generic endpoint for exporting FNCGrid's just like the user had edited and filtered in the browser, that I send FNCGrid's data & settings to the server, export to an XLS and return it as a stream to webcore, so the user can save it through WebBinaryLocalFile.

From the XData service , excelio it's not exporting the properties I mentioned above, unless I set them at cell level.

We'll investigate why this is the case. Thanks for reporting, in the mean time, please use the cell properties.