separate out specific information in a cell in Excel - concatenation

I have received data in Excel from a 3rd party.
They have included all the data in the one cell
I want to separate out some information to get the customer code:
*E.g: All this is in one cell and I want to extract the first 9 digits before the first # symbol
TRANSPORT LIMITED Name Address 052596690#200423R055#000000000605489 144637203 1 2019-08-27844989 B00000008670S 0000000000000000000000*

this should work
Data > Text to Columns > Deliminated > Other (then write in # in the box)

Related

Excel Loop VBA to change cell value one master sheet

really need help on this. probably simple but im a novice so not so easy.
I have a work sheet, we'll call it masterdata. I gather my data form business 365 and paste multiple lines of data into the masterdata sheet. The lines basically consist of a PO number, a sales number, a part number, quantity and customer line number.
I use this data to generate QRCodes in a template on my first sheet named template. The QRcodes are generated by google then brought onto the sheet. (doesnt have to be google but i havent worked out how to get excel to do this without third party addons)
I have a macro split my data into individual sheets based on the PO number, each sheet could end up with 1 - 100 lines of sales data, each one referring to a separate PO number.
On my QRcode template sheet im using an indirect vlookup function to pull the data from each sheet based on the value entered into cell F2.
Can anyone help me automate this a bit as it can be quite time consuming entering the sheet number into F2, deleting the previous results QRCodes and refreshing the QRcodes then printing.
I'd like to auto cycle F2 with the names of each sheet one at a time, delete all QRCodes then refresh/download new QRcodes and print the page.
Is this even possible?
Thank you all in advance for taking the time to review my question.

How to read a flat file and load it into 2 different SQL tables(different table structure) using SSIS 2019

I have a flat file which doesn't have the header record. The data except the trailing record is like a fixed width flat file with no delimiters.
Data in flat file looks like:
TOM ROLLS
DAVECHILLS
TOTAL2XYZ
Fixed Width data(first 2 lines as shown in the above flat file data)
ColumnName Start position End position
Name 1 4
Last_name 5 9
I want to load the data(till trailing record) in data_table and the trailing record(starting with Total) in another table. The data in the total table should look like
c1 c2
2 XYZ
For the data table, I am currently using "fixed width" and dividing the data into different column and it is working fine. Can you please help to load this last trailing record in a different table(Total table as discussed above)
You have not provided enough data for me to test because I can find several methods to load one row and accomplish what you are asking but those methods not necessarily work with multiple rows depending on the structure of you source data.
On the surface it appears that you simply need to make another flat file connection and define the starting and end position to extract only the data for the second table.

How to copy to clipboard from each excel cell and paste to application

I'm just starting out - 2 days into learning python. Trying to automate data entry in user form by reading from excel sheet.
I used the code below but am unable to run this loop for every row.
n=1
for n in range(n, sheet.max_column): #loop till last column in excel
pyperclip.copy(str(sheet.cell (row=1, column=n+1).value)) #copy cell content column wise in clip board
pyautogui.typewrite(pyperclip.paste()) #paste to citrix application user form
keyboard.press_and_release('\t') #tab to shift to enter next form data
keyboard.press_and_release('enter') #new form opened
the data read from excel sheet is :
the data is copied to clip board and pasted to citrix application - data form.
Data in one row represents the data to be copied column wise in data form - 1.
the loop is required to fill data form up to 'n' rows column wise for 'n' forms.
How can i modify the loop above ?
replaced the above code with below :
max_row=sheet.max_row
max_column=sheet.max_column
for i in range(3,max_row+1):
for j in range(1,max_column+1):
cell_obj=sheet.cell(row=i,column=j)
pyperclip.copy(str(cell_obj.value))
pyautogui.typewrite(pyperclip.paste())
keyboard.press_and_release('\t')
keyboard.press_and_release('\n')
works like intended !

Merging Data from four excel files into a single database file

I have 4 excel files and I wanted to insert the data from these 4 excel files to a single database file in MSSQL.
1st Excel file - 10 rows
2nd Excel file - 20 rows
3rd Excel file - 30 rows
4th Excel file - 40 rows
The table in MSSQL should have 100 rows after the task. Thw column names are similar in all the files.
I have taken
tfileInputExcel1 -> tMap -> tMSSQLOutput
tfileInputExcel2
tfileInputExcel3
tfileInputExcel4
All mapped to the same tMap.
I just don´t know how to Map different input sources to a single tMap. I have been searching on the internet on this but I haven¨t find any relevant for my need. Can anyone here help me out on how to map tMap to a multiple input and output sources.
Try this way:
tFileList (with the appropriate file mask)-tFileInputExcel-tMap-tMSSqlOutput
or if you want just one interaction with the database:
tFileList (with the appropriate file mask)-tFileInputExcel-tMap-tHashOutput
onSubJobOk
tHashInput-tMSSqlOutput
Note the tMap is necessary only if you have to transform the input data

Validation against to database

I have several textboxes and users are entering same data in one of these fields. I have another table which is store machine_no. I would like to restrict user for possible wrong entries. Example if there is no machine_no #4 on table, user will be warn with message box.
Machine_no Value1 In first day
1 500
2 400
3 600
Machine_no Value1 second day
1 8678
2 45645
3 54645
Thanks in advance
If you really want to restrict the available choices, I'd replace the free form textbox with a dropdown list of choices populated from your table.
You could use a NumericUpDown control to let the user enter only integers and validate against a generic List of integers or an array of integers (you can load the list with the existing machine numbers on your data base table), and finally you can use ErrorProvider control to show a warning to the user if enters a not valid number.

Resources