Hi, I was wondering how to split for each row in a datatable. For example, a column of my datatable looks as follows: . I would like to know how to split them by space without having to read the excel range (if that is possible).
The process I took was as follows:
I made a datatable using regex to find information in a PDF file.
The second column consists of the regex information (which happens to look like the image above)
I read that onto an excel sheet.
So my question is in a sense, is like how to do text to column in excel, but the datatable version.
I have, it did not work out so well. I cannot send my workflow, but my data table looks something like this: There are also null values in the second column in some rows. Generate Datatable does not seem to like the null values.
I am not sure about attaching a text file because the way I did it was I had to use RegEx in order to find the second column values (hence why they are null values because if the bot cannot find a value in Column 1, it would leave the corresponding Column 2 cell blank).
I cannot attach the PDF because it is for work. But let me give you a rough idea what I had to do, when I read the pdf to a text file it looked something like this: . The idea around it was that I needed to separate the numbers from the "first column (A, C, Sample A, etc. The problem was that when it says Sample A it would split that into 2 columns. So I did regex that looks something like this: . This was an example from a video I followed along. Now what ended up happening was the image I attached above. The first column was one thing, and the numbers are part of another column.
Now, aside from the PDF extracted, there is actually a set list of variables in column 1. Some may not be in the PDF file itself so for example:
A
B
C
Sample A
Sample B
Sample C
Sample D
E
F
Regex could not find “Sample B” and “E”, so hence it leaves it blank on the data table.
So in short, the use of Regex was to separate the first column, and the values that were put in the second column. I just need to figure out a way how to delimit the second column by space.
I was thinking something along the lines of: For every row in Column2, split the string… or something like that.