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 wasn’t able to reproduce the issue. When I add a watermark I was able to load the file, modify it and save it successfully.
Can you attach your sample to investigate what is happening at your side.
Note that this functionality was added in some time in 12.2 with applied service release so for previous version this is not possible.
Hi, I can add watermark as well, but I can not add a TRANSPARENT watermark. When I add a TRANSPARENT watermark I get that error above.
Version: 12.2.20122.1000
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?
I downloaded 13.2 and now it's working. I think we should upgrade to this version.
Did you manage to test my sample? Do you have any further issues?
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.