Consulting

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 41 to 60 of 66

Thread: Importing multiple txt files, but including extra data from file name

  1. #41
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    I think this is what you asked for.
    Attached Files Attached Files

  2. #42
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Is the date the date you import thr data or from the file name?

  3. #43
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    From the file name. Each file is "NetCashMM.DD.YY.txt"

  4. #44
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Ok, this may take a while.

  5. #45
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Can you supply an actual original file for me to work with?

  6. #46
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    Yes, but it will not let me upload the txt file. I'll try again.

  7. #47
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    I'll try compressing.
    Attached Files Attached Files

  8. #48
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Thanks, I take it that you do not need the original VBA code import routine for customers etc that I posted previously?

  9. #49
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    Thank you so much.

  10. #50
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    no Way! I use that 10 times a day thanks to you.

  11. #51
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    OK, do you need data from the first line of the file which tells you the sales period?

    But do you need the old code in with this code?

  12. #52
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    I dont need the data from the first line, that will be read from the file name. All the reports are 1 day reports. I compiled one ( i believe 2/20/20) for you so you had more categories showing the different possibilities that can show up.

    I don't need the old code in with this one. If it imports the file with variable fields included, I believe I can manage from that point. The importing is what I can't figure out.

  13. #53
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Yes, this one is not straightforward, the file format is not normal, ie it is not CSV or using a Space or Tab as a seperator.
    So I need to work with the Table field names, the only problem is if they change them in the file output it may cause the code to crash.
    Can you control the output or is that proprietary?

  14. #54
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    I control the output. So those field names will remain constant.

  15. #55
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Can you control the type of output?
    As it would be easier if it was an actual csv or Tab delimited.

  16. #56
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    No unfortunately that is what I am left with. The only options it gives me is to export to HTML or CSV/TXT

  17. #57
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    That is OK, I have imported a couple of lines and it has seperated out the title and amount for me.
    I just have to figure out waht it is using to do so.

  18. #58
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    I maybe able to use your original code, and instead of one report use a few and get all the information. I don't want to take up your time if the way I am trying now is a huge pain. Let me see if I can get two or three reports and get all the data I need. The reports are in CSV form. Can I get back to you please?

  19. #59
    VBAX Regular
    Joined
    Sep 2019
    Posts
    36
    Location
    I can do it with three reports using your original code! Thank you so much. It will be much better than trying to conform the annoying report. I seriously appreciate everything you do. Thank you .

  20. #60
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    It is not a problem, but for your information the file uses Horizontal Tab as the delimiter.
    So if you want me to do this I can it is just a case of matching the Field names.
    I could do a couple and you could do the rest.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •