How to allign the text in cell in Excel using C# and EXcel com dll?

C

chandan

Hi,
I am exporting text to Excel using Excell Com Dll (Introp.Excell ver
1.5) and C#.I want to allign the text in excel cell using code during
exporting. some thing like......

// worksheet.Cells[row, col] .text.allign= middle

But did not get any function like that.On finding on google I fond
some thing like that...

/ /'Worksheet range A2 and E2
//WSheet.Range("A2:E2").Select()
//EXL.Selection.Columns.AutoFit()
//WSheet.Range("A2:E2").Select()
//'setting up alignment
//With EXL.Selection
//.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter
//End With

But it doesnot work with my code( C# and com DLL).Let me know how can
I allign the text.

Thanks,
Chandan kumar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top