Hello, I am exporting my grid data to excel and I want a watermark text to be seen on this excel file. Can I do this?
Hi Emreo,
You can find this question answered here.
Hello,
it is working but when I load a workbook that has a transparent watermark I get this errror:
System.ArgumentException: The color used to create a WorkbookColorInfo instance must be opaque.Parameter name: color at Infragistics.Documents.Excel.WorkbookColorInfo.ValidateColor(Color color) at Infragistics.Documents.Excel.WorkbookColorInfo..ctor(Nullable`1 color, Nullable`1 themeColorType, Nullable`1 tint, Boolean isLoading, Boolean preventUsingAutomaticColor) at Infragistics.Documents.Excel.Utilities.ToColorInfo(Color color) at Infragistics.Documents.Excel.WorkbookFontProxy.Infragistics.Documents.Excel.ISolidColorItem.set_Color(Color value) at Infragistics.Documents.Excel.Serialization.Excel2007.SharedElements.Drawing.SolidFillElement.OnAfterLoadChildElements(Excel2007WorkbookSerializationManager manager, ElementDataCache elementCache) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.WorksheetShapeSerializationManager.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.SharedElements.Drawing.SpElement.Load(Excel2007WorkbookSerializationManager manager, ExcelXmlElement element, String value, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, ExcelXmlDocument document, XmlReader reader, ElementDataCache elementCache, List`1 elementCacheCollection, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlElementBase.LoadChildElements(Excel2007WorkbookSerializationManager manager, ExcelXmlNode node, BeforeLoadElementCallback beforeLoadElementHandler, AfterLoadElementCallback afterLoadElementHandler, Boolean& isReaderOnNextNode) at Infragistics.Documents.Excel.Serialization.Excel2007.XmlContentTypeBase.Load(Excel2007WorkbookSerializationManager manager, Stream contentTypeStream) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPart(IPackagePart part) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPartRelationships(IEnumerable`1 relationships, ContentTypeBase contentType, Boolean isPostLoad) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPart(IPackagePart part) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPartRelationships(IEnumerable`1 relationships, ContentTypeBase contentType, Boolean isPostLoad) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPart(IPackagePart part) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadPartRelationships(IEnumerable`1 relationships, ContentTypeBase contentType, Boolean isPostLoad) at Infragistics.Documents.Excel.Serialization.Excel2007.Excel2007WorkbookSerializationManager.LoadWorkbookContents() at Infragistics.Documents.Excel.Serialization.WorkbookSerializationManager.Load() at Infragistics.Documents.Excel.Workbook.LoadXLSXFile(Workbook workbook, Stream stream, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Documents.Excel.Workbook.LoadHelper(Stream stream, WorkbookFormat format, String parameterName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Documents.Excel.Workbook.Load(String fileName, IPackageFactory packageFactory, Boolean verifyExcel2007Xml) at Infragistics.Documents.Excel.Workbook.Load(String fileName)
Hi,
I do not know how you put your watermark on the excel but when I load a text from WordArt menu and make the text transparent I get same error on your sample project. I choose to put a background image to excel and this works for me. Thanks.
I have tied again with WordArt and make it transparent and this is still working for me. I have used version : 13.2.20132.1011 . See attached sample. Also I have flowed the following steps in order to add a background image to an excel.
Did you manage to test my sample? Do you have any further issues?
I downloaded 13.2 and now it's working. I think we should upgrade to this version.
I am glad to hear that you manage to get this working. Anyway which was the version that you have tried and didn’t work for you?
Version: 12.2.20122.1000