SSRS Report Colours change when exporting to excel

When we export an SSRS 2008 report to excel and then copy a range from that file to another excel file, the colours used in the report are changed to something that is totally different, very annoying when we use 'Conditonal Formatting' to colour some of these cells a specific colour. Any ideas why?


It is because MS started using Excel's custom color palette with SQL Server 2008 instead of the built-in colors. Problem is exactly as you are describing that when copy & pasting colors from one sheet to another you lose the formatting. Unfortunately: No way around that.

See this post: Excel Export copy to another excel discoloration issue for SSRS 2008


https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=386055

Suggestion from the SSRS team (in the above link/post) Posted by Microsoft on 5/29/2011 at 3:34 PM The API for COM/.NET is similar. You're calling Worksheet.Copy, which does not provide these options. Take a look at Range.Copy and Range.PasteSpecial.

Anyone having link to any C# code for using Range.Copy or PasteSpecial calls to copy from one workbook/sheet to another workbook?

I suppose the KeepSourceFormat or KeepSOurceScheme would be the trick to copy the sheet from one workbook to another to avoid the dis-color issue in SSRS 2008 R2 Excel report.


If you need only to copy and paste it from one file to another, you cant just ctrl+C and ctrl+P. Ctrl+C works fine, but because of something, you need to right click and in Paste options you need to roll down Paste special and find Keep source formating button. It works for me because it keeps all colours and formating except size of cells.

链接地址: http://www.djcxy.com/p/48850.html

上一篇: python解释器:中断并继续

下一篇: 导出为Excel时,SSRS报告颜色会更改