Comment Scinder Un Classeur En Fichiers html
jeromechantilly
Messages postés
5
Date d'inscription
Statut
Membre
Dernière intervention
-
cs_Le Pivert Messages postés 7904 Date d'inscription Statut Contributeur Dernière intervention -
cs_Le Pivert Messages postés 7904 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
Bonjour,
Je souhaite enregistré les onglet dans chaqun un fichier mais dans un format html
j'ai trouve qui me scinde le fichier:
Sub Splitbook()
'Updateby20140612
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
xWs.Copy
Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
mais je n'arrive pas a faire la meme chose en mettant le format html
Bonjour,
Je souhaite enregistré les onglet dans chaqun un fichier mais dans un format html
j'ai trouve qui me scinde le fichier:
Sub Splitbook()
'Updateby20140612
Dim xPath As String
xPath = Application.ActiveWorkbook.Path
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each xWs In ThisWorkbook.Sheets
xWs.Copy
Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
Application.ActiveWorkbook.Close False
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
mais je n'arrive pas a faire la meme chose en mettant le format html
A voir également:
- Comment Scinder Un Classeur En Fichiers html
- Comment réduire la taille d'un fichier - Guide
- Comment ouvrir un fichier epub ? - Guide
- Comment ouvrir un fichier bin ? - Guide
- Renommer des fichiers en masse - Guide
- Comment scinder un pdf - Guide
2 réponses
Bonjour,
comme ceci:
comme ceci:
Option Explicit Sub Splitbook() Dim o As Worksheet 'déclare la variable o (Onglet) Dim no As String 'déclare la variable no (Nom de l'Onglet) Dim chem As String 'déclare la variable chem (CHEMin) chem = ThisWorkbook.Path & "\" 'définit la variable chem For Each o In Sheets 'boucle sur tous les onglets du classeur no = o.Name 'définit la variable no o.Copy 'copy l'onglet 'crée un nouveau classeur ayant pour nom de nom de l'onglet dans le même dossier ActiveWorkbook.SaveAs Filename:=chem & no & ".txt", _ FileFormat:=xlText, CreateBackup:=False Next o 'prochain onglet de la boucle End Sub