Skip to main content
Question

Convert Excel to Image


philippeb
Enthusiast
Forum|alt.badge.img+18

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

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • April 5, 2023

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


david_r
Celebrity
  • April 6, 2023

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings