Dear Infragistics Support,
Below is the error I am getting (referred to in 1. above) when trying to save the unmodified template XLSX file back to disk:
'summaryBelow' is a duplicate attribute name (at XmlWellFormedWriter.AddAttribute)
The Excel Template file I'm using is attached.
Thanks!
The error you are describing seems to be fixed in the 11.2.20112.2068 Silverlight SR and later. Unfortunately, there is currently no support for round-tripping header/footer images, so they are lost when saving and loading. It may be possible to add this support as a bug fix, so I have forwarded this post to the Developer Support Manager and a DS engineer will be contacting you about this issue. However, if the scope of this support is too large, it may need to be implemented as a new feature.
As far as adding images to cells, I don't think Excel supports the scenario you are describing: having an image move and size with cells but keep its aspect ratio. If I am wrong, please let me know how do to this. But I think your best option here would be to size the image to the cell and let it move with cells, but not size with them. That way the image size would never be changed automatically and you can ensure the aspect ratio is maintained. The following code will center the image in cell D12 while maintaining the aspect ratio:
Workbook workbook = new Workbook(WorkbookFormat.Excel2007);
Worksheet worksheet = workbook.Worksheets.Add("Sheet1");
WorksheetImage image = new WorksheetImage(...);
image.SetBoundsInTwips(worksheet, worksheet.GetCell("D12").GetBoundsInTwips(), true);
image.PositioningMode = ShapePositioningMode.MoveWithCells;
worksheet.Shapes.Add(image);
Thanks, I can retry with the latest version once we finish up licensing.
Since there is no support for round-tripping header/footer images, is there a way to insert images into the 3 parts of the Header and/or Footer?
Do you also have sample code for that?
Thanks again,
Warren
Hello Warren,
The issue has been resolved and the latest service release can be found in My Keys & Downloads page.
For the issue on the image header/footer not being exported I have submitted this as development issue #117361. You can also find case CAS-96103-BB7ZK8 linked at the support activity page: https://es.infragistics.com/my-account/support-activity.
Unfortunately, no. Our Excel libraries actually share most of their source files, so they differ very little in object model and functionality. This is not supported on any product's Excel library.
OK.
I understand perhaps your ASP.NET NetAdvantage Library has better Excel support? Would you recommend that (for a Server-side approach e.g. Services)?
If so, again, code samples or web links to code samples would be most appreciated for:
Thanks again so much!
-Warren
No, that is currently not supported. With every feature, if we support modifying something, round-trip support is also fully supported. So there are really three levels of support: no support, round-trip support, and full support. Right now, header/footer images have no support.