Importing sales Invoices
- 4 years ago
HI Komal
Thanks for your answer. the import file was just the first 2 records out of thousands as an example of the import format. I have finally figured it out. Somewhere in the source data system a user is inserting a carrage return in the notes field. While excel code can deal with the the carrage return the import process in Myob turns the carrage return into a new record. Not so easy to find in throusands of rows. But for any one interested in excel code these line will find and remove both line feeds and carrage returns - but does run a bit slower!
Cells.Replace What:="" & Chr(13) & " ", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2
Cells.Replace What:="" & Chr(10) & " ", Replacement:="", LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False, FormulaVersion:=xlReplaceFormula2