Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8983225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:47:19+00:00 2026-06-15T20:47:19+00:00

I got this CSV file with 18000+ rows and 7 columns. When I save

  • 0

I got this CSV file with 18000+ rows and 7 columns. When I save it to .txt from Excel and open in notepad it shows like this:

10012   CITY    10012   CITY    RIKSDAGEN   CITY lokal  10

But I want to change it so lets say: the first CITY starts at position 6 (right after the 2 in 10012) and the second 10012 on a fixed position (lets say 26) etc.

I figured I need to swich the ‘tab’ spaces with regular spaces but with 18000+ rows.. yea.
I don’t know if this could be done in vba or if I a program?

EDIT: The positions I want is 6,26,31,51,81

10012CITY   10012CITY   RIKSDAGEN   CITY lokal  10
1    6      26   31     51          81
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:47:20+00:00Added an answer on June 15, 2026 at 8:47 pm

    One possibility is to prepare data in Excel itself:

    A2:H2: String positions (1;6;26..)
    A3:H3: Your data

    I3: =A3&REPT(" ";B$2-A$2-LEN(A3))
    The formula can be copied to the right and down.

    The result will be cells with added spaces, which can be concatenated into a single cell (=I3&J3...&P3) with spaces in needed locations . The contents of the concatenated cell(s) can be copy-pasted directly to Notepad.

    Example spreadsheet: http://www.bumpclub.ee/~jyri_r/Excel/Getting_fixed_length_csv_file.xls

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hello every one i got a string from csv file like this LECT-3A,instr01,Instructor 01,teacher,instr1@learnet.com,,,,male,phone,,
I've got a CSV file with a format that looks like this: FieldName1, FieldName2,
I've got a CSV file that looks like this: id, name 0, A.D. TRAMONTANA
I've got a list that looks like this: C:\basedir\2011_April\data_20110407.csv ... C:\basedir\2011_January\data_20110101.csv The second file
I've got this code from a post here, which works perfectly: Import-CSV $file |
I've got a data.csv file which is structured like this: n John Smith stats
I have a .csv file generated by Excel that I got from my customer.
I've got a CSV file with 9 columns and I have a MySQL table
I have a csv file that looks something like this (actual file has many
Currently, I have a CSV file set out like this: Element,Weight Hydrogen,1 Oxygen,16 Eventually

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.