Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VS2010 Excel automation - Hozizontal Alignment
Message
De
13/08/2013 16:58:48
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
VS2010 Excel automation - Hozizontal Alignment
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01580431
Message ID:
01580431
Vues:
24
  Excel.Range selectedRange = (Excel.Range)objApp.Selection;
        selectedRange.Columns.AutoFit();
        selectedRange.HorizontalAlignment = HorizontalAlignment.Center;
In the above code, AutoFit works, but Horizontal Alignment doesn't.
  Excel.Range TitleRange = (Excel.Range)xlWorkSheet.get_Range("A3", "M3");
      TitleRange.Style.HorizontalAlignment = HorizontalAlignment.Center;
I tried this..it doesn't work either

I want to enter the text in cells A3-M3.
Any ideas?
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Répondre
Fil
Voir

Click here to load this message in the networking platform