Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I'm not sure if it's the proper forum to ask that but I haven't see any more suitable. I'm trying to use the Office 2003 Web Components into a C# applicatio to display a simple report in a form. I added the COM spreadshee object to the project an included it in a test form. Then I'm trying t display the report in the spreadsheet. The problem I currently have is, I've found no way to set th horizontal alignment of a cell. When trying to use th HorizontalAlignment property of the SpreadSheet.ActiveCell SpreadSheet.Selection or Range objects, the compiler says me: "D:\desarrollo\C#\Gespubli\Formularios\TestForm.cs (46): The languag doesn't admit the property, the indexer or the even 'HorizontalAlignment'; try to call directly the methods with acces descriptor 'OWC11._Range.get_HorizontalAlignment()' 'OWC11._Range.set_HorizontalAlignment(OWC11.XlHAli gn)'" The problem is, this methods doesn't exist... so I can't use them! I have similar problems with cell colors, font properties, etc. Can anybody give me a hint? Here's the code: Code ------------------- // Get first worksheet OWC11.Worksheetws = (OWC11.Worksheet)axSpreadsheet1.Worksheets[1]; // Set worksheet name ws.Name = "Reportes"; // Get some cells from the first line range = (OWC11.Range)ws.get_Range("A1","E1"); // Merge the cells range.Merge(ref btmp); // Select the merged cell range.Select(); // Set the cell text axSpreadsheet1.ActiveCell.set_Value(System.Type.Mi ssing,"REGIONAL"); // Until here all works ok. But that doesn't work: axSpreadsheet1.ActiveCell.HorizontalAlignment = OWC11.XlHAlign.xlHAlignCenter; ------------------- -- Urotsukidoj ----------------------------------------------------------------------- Urotsukidoji's Profile: http://www.officehelp.in/member.php?userid=515 View this thread: http://www.officehelp.in/showthread.php?t=126378 Posted from - http://www.officehelp.i |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Alignment problem with spreadsheet | New Users to Excel | |||
In Cell alignment, how do I update the default vertical alignment | Setting up and Configuration of Excel | |||
vertical text alignment problem when printing | Excel Discussion (Misc queries) | |||
Command Button Alignment Problem | Excel Programming | |||
Text format alignment problem | Excel Programming |