How To Import General Journal Header using X++ Code And Lines Import From Excel

You can execute it from X++, of course. What problem do you have with it.
Obviously designing, implementing, testing and maintain your own code for something that AX already contains (and Microsoft supports) would be a waste of time.