Data Loader comes with a feature to build a template automatically by recording keystrokes and mouse clicks. Using the Data Loader Macro recorder a user has to just enter a sample record in the target form and macro recorder will capture all the data including the special keys in the background and will generate a template automatically.
To start with automatic generation, please do the following
Start your target application form and place cursor in the first field of the form.
Start Forms Data Loader, if it's not already started, and switch to it's window
Click the "Create new load by Recording Macro" button in the Data Loader toolbar
You will now see a "Record Macro" window as shown below
Click "Start Recording" button and then "Record Macro" window will get minimized and you will see your Target application window. Now Start entering a sample record in the target application form as you do normally. Remember to use keys to save the record in the target application. If you have checked the "Record Mouse Clicks" checkbox, then you can also use mouse to save the record in the target application.
Once you have finished entering a Sample Record in the target application, click "Stop Recording" Button in the minimized "Record Macro" window which will on the top right hand side of your desktop.
Once you click the "Stop Recording" button, Data Loader will show all the items it has recorded in the spreadsheet as shown below
Click "Create Load" button and the template is ready. You can make the changes to the sheet i.e. add new items or delete columns as you like.
After you populated the sheet with you own data you can click "Start Load" button to start loading.