Jump to content

converting txt file into an excel spreadsheet


Recommended Posts

Microsoft offers the COM (Component Object Model) for Excel. AutoIt allows to access Excel via COM. So the help file for Excel COM can be found searching MS (Excel 2007 can be found here and Excel 2010 here).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Is there a reason why you don't just open the txt files with Excel? If not, I suggest doing so to simplify your code. You can specify which row to start appending the data from your text file in the Excel file with a delimiter of your choice. Afterwards, you can add your row descriptions with a column insert.

I didn't know that I could do that. I did try it and but all the data is vertical and not horizontal.

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

If you want to attempt to use the method of Excel opening your text files for your solution you could try these two options:

1 - Create a quick script to change the CRLF to tabs and your ";" to CRLF in your text files. Excel will treat tabs in a text line the same as if you pressed it moving the active cell to the next adjacent cell (left to right) before assigning the string.

2 - Use Selection.PasteSpecial with corresponding parameters to cut and paste with transpose.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...