Hi,
I want to convert a incoming html file into csv/txt and I have a windows form through which i want to the insert that file's data into database(MYSQL).
The data will get inserted into the textboxes and then it will get inserted into table's column accordingly.
Also I'm actually scanning a ID's QR code from Android app through which on sharing I get the HTML data.
Is there anyway that it could fetch that file and then automatically import that file convert it and then import it or anything??
What should I do?
I have searched alot but not getting anything.
I want the latest text file to be inserted.
What I have tried:
1.I have successfully made a form that inserts data into database from the textboxes into the table columns.
2.I have written a powershell command that converts the html file into txt, it removes the html tags and delimits the data accordingly.
3.The powershell command exports the file with system date stamp.
The batch file command is something like this:
powershell -Command "(gc bluetooth_content_share.html) -replace '<[^>]+>', '' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Name : ', '' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'UID : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Gender : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Date of Birth : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Street : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Address : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Village : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'District : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'State : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'Pincode : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) -replace 'City : ', ',' | Out-File bluetooth_content_share.txt"
powershell -Command "(gc bluetooth_content_share.txt) | Set-Content -Encoding utf8 bluetooth_content_share.txt
ren "bluetooth_content_share.txt" "bluetooth_content_share-%date:~10,4%%date:~7,2%%date:~4,2%-%time:~0,2%%time:~3,2%.txt"