Problem in Excel spreadsheet control in C# program

   Hi All,

    I am using the "AxMicrosoft.Office.Interop.Owc11.AxSpreadsheet" excel control on C# WinForm. I am writing the data on the Cells at run time I would like to do formatting of the cells like Bold, Merge etc.

    When I do in C# "_axsInkSeparationParameters.ActiveSheet.Cells.Font.Bold = true" it says  Error: "try directly calling accessor methods 'Microsoft.Office.Interop.Owc11._Range.set_Bold()" But there is no method called set_Bold() in the Microsoft.Office.Interop.Owc11.Range interface.

   When I use in VB.Net it works fine.

With AxSpreadsheet1.ActiveSheet.Range("A1", "A5")

.Value2 = "Rama"

.Font.Bold = True

.Font.Color = "Blue"

.MergeCells = True

End With

    Please help me how to do in C# like Bold, Merge etc.

 

Advance Thanks

ram

  




Answer this question

Problem in Excel spreadsheet control in C# program