Bonjour, j'aimerais imprimer un tableau sur une feuille exemple de 8cm large
par 10cm de haut , peut-on savoir quel chiffre de hauteur de ligne = 1cm et
quel largeur de colonne = 1cm , tout ca dans le but d'imprimer dans une
grandeur donner. L'idéal serait de prendre n'importe laquel fichier et le
réduire a une grandeur donner juste pour l'impression, sans utiliser de macro
si possible.
Si tu cherche à avoir l'équivalnt de la largeur en point avec celle en mm tu peux utilisez le code ci dessous.
Tu place en C5: Le n° de la ligne ( Ou colonne que tu veux ajuster) en C6: la largeur en mm
Lance la macro Largcol ou HautCol
Ensuite tu imprime le tout à 100%
'Set row height and column width in millimeters 'Set row height and column width in millimeters 'The macros below lets you set row heights and column widths using millimeters as a scale:
Sub SetColumnWidthMM(ColNo As Long, mmWidth As Integer) ' changes the column width to mmWidth Dim w As Single If ColNo < 1 Or ColNo > 255 Then Exit Sub Application.ScreenUpdating = False w = Application.CentimetersToPoints(mmWidth / 10) While Columns(ColNo + 1).Left - Columns(ColNo).Left - 0.1 > w Columns(ColNo).ColumnWidth = Columns(ColNo).ColumnWidth - 0.1 Wend While Columns(ColNo + 1).Left - Columns(ColNo).Left + 0.1 < w Columns(ColNo).ColumnWidth = Columns(ColNo).ColumnWidth + 0.1 Wend End Sub
Sub SetRowHeightMM(RowNo As Long, mmHeight As Integer) ' changes the row height to mmHeight If RowNo < 1 Or RowNo > 65536 Then Exit Sub Rows(RowNo).RowHeight = Application.CentimetersToPoints(mmHeight / 10) End Sub
Sub LargCol() SetColumnWidthMM Sheets(1).Range("C5").Value, Sheets(1).Range("C6").Value
End Sub
'This example macro shows how you can set the row height for row 3 and the column width for column C to 3.5 cm: Sub HautCol() SetRowHeightMM Sheets(1).Range("C5").Value, Sheets(1).Range("C6").Value End Sub
Nota: Afin de rentre à misange ce qui est à misange, j'ai pompé tout cela sur le site Disciplus.
Si tu cherche à avoir l'équivalnt de la largeur en point avec celle en
mm tu peux utilisez le code ci dessous.
Tu place
en C5: Le n° de la ligne ( Ou colonne que tu veux ajuster)
en C6: la largeur en mm
Lance la macro Largcol ou HautCol
Ensuite tu imprime le tout à 100%
'Set row height and column width in millimeters
'Set row height and column width in millimeters
'The macros below lets you set row heights and column widths using
millimeters as a scale:
Sub SetColumnWidthMM(ColNo As Long, mmWidth As Integer)
' changes the column width to mmWidth
Dim w As Single
If ColNo < 1 Or ColNo > 255 Then Exit Sub
Application.ScreenUpdating = False
w = Application.CentimetersToPoints(mmWidth / 10)
While Columns(ColNo + 1).Left - Columns(ColNo).Left - 0.1 > w
Columns(ColNo).ColumnWidth = Columns(ColNo).ColumnWidth - 0.1
Wend
While Columns(ColNo + 1).Left - Columns(ColNo).Left + 0.1 < w
Columns(ColNo).ColumnWidth = Columns(ColNo).ColumnWidth + 0.1
Wend
End Sub
Sub SetRowHeightMM(RowNo As Long, mmHeight As Integer)
' changes the row height to mmHeight
If RowNo < 1 Or RowNo > 65536 Then Exit Sub
Rows(RowNo).RowHeight = Application.CentimetersToPoints(mmHeight /
10)
End Sub
Sub LargCol()
SetColumnWidthMM Sheets(1).Range("C5").Value,
Sheets(1).Range("C6").Value
End Sub
'This example macro shows how you can set the row height for row 3 and
the column width for column C to 3.5 cm:
Sub HautCol()
SetRowHeightMM Sheets(1).Range("C5").Value,
Sheets(1).Range("C6").Value
End Sub
Nota: Afin de rentre à misange ce qui est à misange, j'ai pompé tout
cela sur le site Disciplus.
Si tu cherche à avoir l'équivalnt de la largeur en point avec celle en mm tu peux utilisez le code ci dessous.
Tu place en C5: Le n° de la ligne ( Ou colonne que tu veux ajuster) en C6: la largeur en mm
Lance la macro Largcol ou HautCol
Ensuite tu imprime le tout à 100%
'Set row height and column width in millimeters 'Set row height and column width in millimeters 'The macros below lets you set row heights and column widths using millimeters as a scale:
Sub SetColumnWidthMM(ColNo As Long, mmWidth As Integer) ' changes the column width to mmWidth Dim w As Single If ColNo < 1 Or ColNo > 255 Then Exit Sub Application.ScreenUpdating = False w = Application.CentimetersToPoints(mmWidth / 10) While Columns(ColNo + 1).Left - Columns(ColNo).Left - 0.1 > w Columns(ColNo).ColumnWidth = Columns(ColNo).ColumnWidth - 0.1 Wend While Columns(ColNo + 1).Left - Columns(ColNo).Left + 0.1 < w Columns(ColNo).ColumnWidth = Columns(ColNo).ColumnWidth + 0.1 Wend End Sub
Sub SetRowHeightMM(RowNo As Long, mmHeight As Integer) ' changes the row height to mmHeight If RowNo < 1 Or RowNo > 65536 Then Exit Sub Rows(RowNo).RowHeight = Application.CentimetersToPoints(mmHeight / 10) End Sub
Sub LargCol() SetColumnWidthMM Sheets(1).Range("C5").Value, Sheets(1).Range("C6").Value
End Sub
'This example macro shows how you can set the row height for row 3 and the column width for column C to 3.5 cm: Sub HautCol() SetRowHeightMM Sheets(1).Range("C5").Value, Sheets(1).Range("C6").Value End Sub
Nota: Afin de rentre à misange ce qui est à misange, j'ai pompé tout cela sur le site Disciplus.
il y a dans la case "Format de papier" Format de papier défini par l'ultilisateur mais je ne l'ai jamais utilisé, d'après ce que je voie il faut définir ce format dans les options de l'imprimante.
isabelle
isabelle
Bonjour isabelle je sais comment faire pour ajuster pour une page mais peut-on imprimer ex a une grandeur 5cm large x 8 cm haut
bonjour Aiwa,
voie au menu, Fichier, Mise en page, ongle Page, cocher Ajuster 1 page en largeur 1 en hauteur.
il y a dans la case "Format de papier" Format de papier défini par
l'ultilisateur
mais je ne l'ai jamais utilisé, d'après ce que je voie il faut définir
ce format dans les options de l'imprimante.
isabelle
isabelle
Bonjour isabelle je sais comment faire pour ajuster pour une page mais
peut-on imprimer ex a une grandeur 5cm large x 8 cm haut
bonjour Aiwa,
voie au menu, Fichier, Mise en page, ongle Page, cocher Ajuster 1 page
en largeur 1 en hauteur.
il y a dans la case "Format de papier" Format de papier défini par l'ultilisateur mais je ne l'ai jamais utilisé, d'après ce que je voie il faut définir ce format dans les options de l'imprimante.
isabelle
isabelle
Bonjour isabelle je sais comment faire pour ajuster pour une page mais peut-on imprimer ex a une grandeur 5cm large x 8 cm haut
bonjour Aiwa,
voie au menu, Fichier, Mise en page, ongle Page, cocher Ajuster 1 page en largeur 1 en hauteur.