text file

  1. L

    VBA Import all lines of data from a variable text file

    I have a text file which includes lines of text as shown below: 21599999902230123129285103920952123456789DOE, JOHN 0000000000000000000000000000000000000000000000000000000000000000000P019680201202112080000000000164221642200085013959...
  2. D

    VBA Text Output but user can select location

    I'm using VBA to take the contents of a certain range an output it as a text file. The file is actually XML data for upload to another system, so the text file has to have a specific extension, "filename.nrc". I originally designed it to always save to the Documents folders in the users local...
  3. M

    Power query with data in difficult format

    Hello, I'm trying to take a text file with data in the following format. The data begins like this: OGRID: [373075] XTO PERMIAN OPERATING LLC. Reference ID: fAPP2226958316 Reference Period: 202301 Days Reported: 18 Total Flared: 14,355 MCF Total Vented: 0 MCF OGRID: [373075] XTO PERMIAN...
  4. J

    vba save file as txt file

    Hello, I am new here and still learning VBA. I am struggling with my code. I have multiple sheets that I need to save as a txt file in the same workbook. However, the code is only working when the sheet is selected. Can someone help me out with my code? Sub DOTtxt() Dim wb As ThisWorkbook...
  5. A

    Making a text file with identical name & Path

    Hello all! I have some VBA that is creating a pipe delimited text file, but I am struggling to get the name correct. I have managed to save it in the same location, but attempting to name it the same as the excel file has failed. Any help would be greatly appreciated. Sub PipeDelimited()...
  6. F

    Importing Lines from a Text File Which Meet Certain Criteria using VBA

    Hi all, Looking to get some expert help as i'm a novice with VBA. I've currently tried searching online and i can't seem to find a macro that can help with what i am trying to do. Essentially i have large data files with more then 1.6 million lines of data. I currently have a macro which...
  7. N

    VBA for saving values in one column to text file

    Hello, New to the forum. I've learned a lot just reading. Wondering if someone can help me with the VBA code below. It DOES save the whole worksheet to a text file, but I would like it to also Only save content in Column K Skip over blank cells in Column K Sub saveText()...
  8. T

    Exporting Excel Workbook to Multiple Text Files Based on Formula

    Hello! I would like to design a macro that will split and Excel workbook with 3 columns (Name, Account Number, Occurrence) into multiple text files. The first column (named Occurrence) contains a formula which assigns a number (an occurrence) to each row of data depending on how many times the...
  9. M

    Range to a txt file attachment

    Hi all, I found some articles over the internet addressing similar problems like mine but for some reason couldnt tweak it to my needs. So appreciate if you can help me with it. I have a range in a tab that i want to attach in outlook email as a text file. Lets assume my range is code...
  10. M

    Read text file using ADO and populate a... Listbox in this example

    The below sub i created to populate a listbox using ADO to read a text file as Access and SQL were unavailable. I needed 2 columns from the txt file and one would differ per user so i used the persons computer username as the column name i would need (so it would work for anybody in the table)...
  11. M

    Copy 2 columns of data from a text file using criteria for listbox

    Hi all I have had a try with this and it's beaten me too. i'm trying to display 2 columns from a text file. Row 1 are headings and the environ$"username" will be the column name I wish to use and contains annual leave type data going down. And i would like to display column 1 which will have...
  12. M

    Update text file with excel user form data

    Hi All As usual i'm back with probably what is a really silly easy question. I have created a user form which has text boxes, labels, comboboxes, checkboxes etc. I would like to know if there's a way i can use them to update specific records in a text file. Basically If Column 1 uses the...
  13. K

    Export to Text File - Width Limitation Issues

    I have developed VBA coding to export contents of cells in a delimited format to a text file. Each line of data must be a continuous string but I am running into an issue with the width limitations of text files. The excess of some lines (that exceed the width limitations) appear below my data...
  14. S

    Auto import data from text files into Excel spreadsheet and merge

    I'm trying to automate my data import method to save time. Right now 2 text files are created and saved in a folder before being opened in Excel, the required data highlighted and then copied and pasted into the relevant cells in the ROPdata sheet shown below. The first file is called...
  15. andrewb90

    Export Renames current sheet

    Hello all, I am trying to export data from a sheet, but when I do, it creates a txt file and renames my workbook the same thing. I just need to have the text file created. Sub export() ' Application.CutCopyMode = False ActiveWorkbook.SaveAs...
  16. C

    Combine all text files in folder into one.

    I can make my request easier known by showing how I know to do something: From the windows command prompt, I can type cd C:\strFolderName\strSubFolderName\ and it will change to the directory. then if I type Copy *.txt ALL.txt When you do this it will make a new .txt file called "All.txt"...
  17. J

    VBA Write Active Sheet Cell Data to External File WITHOUT Quotes

    What I'm trying to achieve should be simple, but Excel keeps making it very difficult for me. All I want is a macro that does exactly the following and nothing else: Export all of the data in the active sheet to a text file in the active workbook directory The filename should be the name of...
  18. O

    Import Text File

    When I import a text file, there is a question mark that appears in a cell but not in the original text file. Also, it combines the text in in one cell when it should be in two separate columns. The first line in the picture is correct. The second line in the picture is wrong...
  19. K

    VBA from Windows to Mac

    Hi all, I had this code working great on my PC. When converting to mac, it will create the text file but fails at the "save-as". I have the newest excel for mac. Can any give advice? Here is the Sub ExportCSV() ' ' ExportCSV Macro Dim MyPath As String Dim MyFileName As String 'The path...
  20. T

    converting currency to txt file format

    I need to change a dollar amount to a zero filled field in a text file. i.e. 231.17 to: 000000023117 and 250.00 to: 000000025000 Help!

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back