ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Restructuring Text file to CSV

    Scheduled Pinned Locked Moved IT Discussion
    text editorcsvexcel
    26 Posts 5 Posters 5.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      LOL, right. It's Tab instead of space! The original file is an SSB, Space Separate Values.

      1 Reply Last reply Reply Quote 0
      • gjacobseG
        gjacobse @JaredBusch
        last edited by

        @JaredBusch said:

        @gjacobse said:

        While I suppose technically speaking, yes it would be a TSV - Tab Space Value.

        This would be Tab Separated Value

        Yea,.. there is that...

        1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller
          last edited by

          So anyway, that one command solves the problem nice and easy.

          1 Reply Last reply Reply Quote 0
          • gjacobseG
            gjacobse
            last edited by

            I expect that the 'best course of action' is to have the User rerun the export and adjust accordingly.

            However I was hoping to perform a trial run of the import with the data I have, about 100 lines or so. But each row has seven (x)DATE items...

            scottalanmillerS 1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller @gjacobse
              last edited by

              @gjacobse said:

              I expect that the 'best course of action' is to have the User rerun the export and adjust accordingly.

              However I was hoping to perform a trial run of the import with the data I have, about 100 lines or so. But each row has seven (x)DATE items...

              So does the command that I provided work? Can you provide full sample data so that we can test?

              gjacobseG 1 Reply Last reply Reply Quote 0
              • gjacobseG
                gjacobse @scottalanmiller
                last edited by

                @scottalanmiller said:

                @gjacobse said:

                I expect that the 'best course of action' is to have the User rerun the export and adjust accordingly.

                However I was hoping to perform a trial run of the import with the data I have, about 100 lines or so. But each row has seven (x)DATE items...

                So does the command that I provided work? Can you provide full sample data so that we can test?

                My apologies Scott, I missed your Linux command in a page refresh.

                Sadly I don't have this file on a Linux system.. Windows only...

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @gjacobse
                  last edited by

                  @gjacobse said:

                  Sadly I don't have this file on a Linux system.. Windows only...

                  So copy it, only takes a second.

                  JaredBuschJ 1 Reply Last reply Reply Quote 1
                  • JaredBuschJ
                    JaredBusch @scottalanmiller
                    last edited by

                    @scottalanmiller said:

                    @gjacobse said:

                    Sadly I don't have this file on a Linux system.. Windows only...

                    So copy it, only takes a second.

                    Maybe true, but my earlier questions remains unanswered. Those are more important than a simple "just copy it" answer.

                    He clearly stated this will be something repeated later with at least one more file. Thus I asked what the true purpose here is supposed to be.

                    gjacobseG 1 Reply Last reply Reply Quote 0
                    • gjacobseG
                      gjacobse @JaredBusch
                      last edited by

                      @JaredBusch said:

                      Maybe true, but my earlier questions remains unanswered. Those are more important than a simple "just copy it" answer.

                      He clearly stated this will be something repeated later with at least one more file. Thus I asked what the true purpose here is supposed to be.

                      Exporting IT Tickets from TrackIT to be imported into SpiceWorks

                      JaredBuschJ 1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @gjacobse
                        last edited by

                        @gjacobse said:

                        Exporting IT Tickets from TrackIT to be imported into SpiceWorks

                        Ah, then I would do what @scottalanmiller said. Copy it to a Linux system quickly and convert it.

                        Alternately staying in WIndows you could use Notepad++ advanced find and replace features to pattern match and replace the space with a tab.

                        1 Reply Last reply Reply Quote 1
                        • DashrenderD
                          Dashrender
                          last edited by

                          Notepad will do the same thing.

                          1 Reply Last reply Reply Quote 0
                          • C
                            Carnival Boy
                            last edited by Carnival Boy

                            Yeah, Notepad replace supports tabs, I just tested it. You can't easily replace a space with a tab, because your file will full of spaces in other columns that you don't want replacing.

                            I would probably do a replace of '[space]12:' with '[tabbed space]12:', so that it replaces all the spaces before a 12: in the time with a tab, and then repeat this for 01:; 02:, 03: etc etc upto 23: (assuming a 24 hour clock). It does mean running a search and replace 24 times which is a pain. There are also likely to be tabs added elsewhere where you didn't want them, such as in the body of the helpdesk tickets.

                            What I'd actually do is use the wonderful, and under-rated, Microsoft Access. Access is a fantastic text manipulation tool. It's very powerful, but you need a bit of experience to get it working.

                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @Carnival Boy
                              last edited by

                              @Carnival-Boy said:

                              the wonderful, and under-rated, Microsoft Access.

                              Die in a fire heretic!

                              1 Reply Last reply Reply Quote 2
                              • 1
                              • 2
                              • 2 / 2
                              • First post
                                Last post