Bonjour
J'ai un problème à priori incompréhensible pour moi.
J'ai un code d'importation d'un fichier csv qui contient 20.000 lignes
- il marche nickel si le code est lancé en pas à pas (F8) : il y a bien 20.000 lignes dans la feuille excel
- qui déconne si le code est lancé en mode automatique (exécute tout le code) : il y a 16 683 lignes !
Comment est ce possible qu'un même code donne des résultats d'importation différents selon que la macro est exécutée en automatique ou manuel ?!?
J'ai bien tenté de faire un application wait mais ça ne résoud pas le pb. Je suis allé voir la 16 683ème ligne, il n'y a rien de spécial, pas de caractère bizarre, etc.
Une idée?
Merci
Alexis
Excel2.Workbooks.OpenText Filename:=f, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:= _
True, Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array( _
1, xlTextFormat), Array(2, xlTextFormat), Array(3, xlTextFormat), Array(4, xlTextFormat), Array(5, xlTextFormat), Array(6, xlTextFormat), Array(7, xlTextFormat), Array(8, _
xlTextFormat), Array(9, xlTextFormat), Array(10, xlTextFormat), Array(11, xlTextFormat), Array(12, xlTextFormat), Array(13, xlTextFormat), Array(14, xlTextFormat), Array(15, xlTextFormat), _
Array(16, xlTextFormat), Array(17, xlTextFormat), Array(18, xlTextFormat), Array(19, xlTextFormat), Array(20, xlTextFormat), Array(21, xlTextFormat), Array(22, xlTextFormat), Array(23, xlTextFormat), Array(24, xlTextFormat), Array(25, xlTextFormat), Array(26, xlTextFormat)), TrailingMinusNumbers:=True, local:=True
J'ai un problème à priori incompréhensible pour moi.
J'ai un code d'importation d'un fichier csv qui contient 20.000 lignes
- il marche nickel si le code est lancé en pas à pas (F8) : il y a bien 20.000 lignes dans la feuille excel
- qui déconne si le code est lancé en mode automatique (exécute tout le code) : il y a 16 683 lignes !
Comment est ce possible qu'un même code donne des résultats d'importation différents selon que la macro est exécutée en automatique ou manuel ?!?
J'ai bien tenté de faire un application wait mais ça ne résoud pas le pb. Je suis allé voir la 16 683ème ligne, il n'y a rien de spécial, pas de caractère bizarre, etc.
Une idée?
Merci
Alexis
Excel2.Workbooks.OpenText Filename:=f, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, Semicolon:= _
True, Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array( _
1, xlTextFormat), Array(2, xlTextFormat), Array(3, xlTextFormat), Array(4, xlTextFormat), Array(5, xlTextFormat), Array(6, xlTextFormat), Array(7, xlTextFormat), Array(8, _
xlTextFormat), Array(9, xlTextFormat), Array(10, xlTextFormat), Array(11, xlTextFormat), Array(12, xlTextFormat), Array(13, xlTextFormat), Array(14, xlTextFormat), Array(15, xlTextFormat), _
Array(16, xlTextFormat), Array(17, xlTextFormat), Array(18, xlTextFormat), Array(19, xlTextFormat), Array(20, xlTextFormat), Array(21, xlTextFormat), Array(22, xlTextFormat), Array(23, xlTextFormat), Array(24, xlTextFormat), Array(25, xlTextFormat), Array(26, xlTextFormat)), TrailingMinusNumbers:=True, local:=True