How do I set a text in clipboard using C# in order to past it into excel with different background/font color for each cell? -


I follow the pattern below and I can easily copy the text to the clipboard so that it can be used later in Excel But now I like the different background / font colors for each cell.

When the data is copied to the clipboard, then format it as a separate tab for the tab, and enter separately for the rows. It automatically inserts values ​​into rows and columns while pasting in Excel.

Example of my code:

  string clipboard text = "cell 11" + "\ t" + "cell 12" + "\ r \ n" + "cell 21 "+" \ t "+" "cell 22"; Clipboard.SetText (clipboardText);  

How to set the background / font color for each cell?

I'm afraid that the clipboard for the job is a very easy tool if I were you, then I used it I am here.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -