Home > Article > Development Tools > How to record macros with Notepad++
The following tutorial column from notepad will introduce you to recording macros with Notepad. I hope it will be helpful to friends who need it!
We need to change the header of the csv document into the fields of MySQL DB, so that when importing csv data, it can be based on the set fields. To process and import data in corresponding fields, you can use Notepad to achieve this semi-automatic function.
The steps are as follows:
Open Notepad -> Macro -> Start Recoding
Copy and paste the csv header that needs to be processed Go to Notepad:
Ctrl F, bring up Find, and then use regular expression processing: copy spaces, Replace with \r
Then use ^ and $ to add '
before and after, and then add the field data type at the end:
Save the Macro after completion
Then complete the sql statement:
CREATE TABLE `xxx`.`xxxx-test` ( `BoardNo` varchar (100), `StationID` varchar (100), `starttime` datetime, `SFCStatus` varchar (100), `TotalTestTime` varchar (100), `result` varchar (100), `WIFI_11B_TX1_2412` varchar (100), `WIFI_11AG_TX1_2437` varchar (100), `WIFI_11N_TX1_2472` varchar (100), ) ENGINE=InnoDB DEFAULT CHARSET=utf8
The above is the detailed content of How to record macros with Notepad++. For more information, please follow other related articles on the PHP Chinese website!