PresetTexture and TextureName properties not working in Excel Interop Chart FillFormat API with a C# add in. RRS feed

  • Question

  • Hello there,

    I am working on an Excel 2007/2010 add in written in C#. I want to be able to get the current fill format of the ChartArea for the active chart. So I create a chart, I format the chart area, and then I look at the CharArea Format's FillFormat property. Everything appears to work great for solid, gradient and pattern fills - that is, the FillFormat contains the information that I would expect. However, when I do a picture or texture fill, the FillFormat tells me that it is, indeed, a texture fill, but it doesn't tell me what the texture is. The PresetTexture property is always set to "mixed", regardless of the preset texture that I have selected. When I try a user-defined texture, the TextureName property always throws an exception - it is supposed to contain the name of the user-defined texture. The texture fills visually look fine on the chart - I just can't access these values through the API. Has anyone else run into this problem? Are there any known workarounds? They MUST be storing these values SOMEWHERE that is accessible via the API - I just haven't been able to find it. Thanks!


    Tuesday, March 29, 2011 3:43 PM