Bordure Excel VB.net

spike62300 Messages postés 73 Date d'inscription vendredi 5 novembre 2004 Statut Membre Dernière intervention 14 septembre 2007 - 1 juin 2005 à 16:40
spike62300 Messages postés 73 Date d'inscription vendredi 5 novembre 2004 Statut Membre Dernière intervention 14 septembre 2007 - 2 juin 2005 à 08:15
Bonjour,

je souhaite borduré certains colones d'un export excel

.borders.item(export.xlApp.XlbordersIndex.XlBordersLeft).linestyle=1 ne fonctionne pas
Il me dit que XlbordersIndex n'appartient pas a excel.application

Qui peut m'aider

spike

2 réponses

cs_lim Messages postés 329 Date d'inscription jeudi 20 novembre 2003 Statut Membre Dernière intervention 10 mai 2014 7
1 juin 2005 à 16:52
voilà ce que j'ai fait après l'adaptation d'une macro excel
crée un cadre autout de la cellule
t représente la cellule à encadrer ("A1" par exemple)


Private
Sub Encadre(
ByVal t
As
String)



xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlDiagonalDown).LineStyle = Excel.Constants.xlNone


xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlDiagonalUp).LineStyle = Excel.Constants.xlNone


With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeLeft)


.LineStyle = Excel.XlLineStyle.xlContinuous


.Weight = Excel.XlBorderWeight.xlThin


.ColorIndex = Excel.Constants.xlAutomatic



End
With



With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeTop)


.LineStyle = Excel.XlLineStyle.xlContinuous


.Weight = Excel.XlBorderWeight.xlThin


.ColorIndex = Excel.Constants.xlAutomatic



End
With



With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeBottom)


.LineStyle = Excel.XlLineStyle.xlContinuous


.Weight = Excel.XlBorderWeight.xlThin


.ColorIndex = Excel.Constants.xlAutomatic



End
With



With xlsheet.Range(t).Borders(Excel.XlBordersIndex.xlEdgeRight)


.LineStyle = Excel.XlLineStyle.xlContinuous



'.Weight = Excel.XlBorderWeight.xlThin


.ColorIndex = Excel.Constants.xlAutomatic



End
With

end sub

@+
LIM
0
spike62300 Messages postés 73 Date d'inscription vendredi 5 novembre 2004 Statut Membre Dernière intervention 14 septembre 2007
2 juin 2005 à 08:15
Ben en fait je n'utilise pas excel en tant que excel.application comme toi mais le probleme avec excel 2000, kan tu kitte la connexion, il y a toujours le processus excel ki tourne donc g trouvé un autre code
Mon

export.xlApp.cells(1, i).borders.item(export.xlApp.XlBordersIndex.xlEdgeLeft).LineStyle = 11

ne fonctionne pas

Je ne sais koi faire ^^

spike
0
Rejoignez-nous