Rex
asked on
Parse email body text into Excel cells
Looking for VBA Code to Parse Variable Length List into a Table
The text (from the Body of an email) looks like this... I want to extract that into individual cells in Excel
PALLET ID LABEL CREATION TIME NET WEIGHT
-------------------------- ---------- ---------- ---------- -------
125640400926 15-AUG-18 20:33:34.0 1091
125640400933 15-AUG-18 22:23:34.0 1091
125640400938 16-AUG-18 00:19:51.0 1091
125640400944 16-AUG-18 01:29:01.0 1091
125640400951 16-AUG-18 03:35:05.0 1091
125640400956 16-AUG-18 04:37:27.0 1091
125640400961 16-AUG-18 05:50:58.0 1091
125640400972 16-AUG-18 08:05:38.0 1091
The text (from the Body of an email) looks like this... I want to extract that into individual cells in Excel
PALLET ID LABEL CREATION TIME NET WEIGHT
--------------------------
125640400926 15-AUG-18 20:33:34.0 1091
125640400933 15-AUG-18 22:23:34.0 1091
125640400938 16-AUG-18 00:19:51.0 1091
125640400944 16-AUG-18 01:29:01.0 1091
125640400951 16-AUG-18 03:35:05.0 1091
125640400956 16-AUG-18 04:37:27.0 1091
125640400961 16-AUG-18 05:50:58.0 1091
125640400972 16-AUG-18 08:05:38.0 1091
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If the email is text (not html) and all your column widths are fixed, you could easily replace the spaces using SUBSTITUTE and use MID to grab your column data...without using VBA. Just a thought.
Do you already have code to get the body of the email?
Where would the data go in Excel, a new workbook or an existing workbook?