Question

Convert Excel to Image


Badge +8

Hi,

 

We have tables of values with colors in Excel that we would want to integrate in a mxd.

I though to export them automatically in jpeg files. It would be easier after to integrate images in mxd.

How could I do that with FME?

 

Thanks !


2 replies

Userlevel 5
Badge +29

To do anything with an MXD in FME, you'll to use a PythonCaller and ArcPy

 

https://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/mapdocument-class.htm

Userlevel 4

If you want to create a jpeg file with a single, specific color, you could e.g. use the RasterRGBCreator followed by a JPEG writer. You could then publish the color value as a parameter and use a second workspace to loop over all the Excel lines (FMEServerJobSumitter or WorkspaceRunner).

If you have RGB values in your Excel, you can convert them to an FME color code like this:

@round(@Value(Red)/255,3),@round(@Value(Green)/255,3),@round(@Value(Blue)/255,3)

Given that the attribute names are "Red", "Green" and "Blue".

Reply