
If you have a lot of data or if this will be a repeating process, consider External Tables or SQL*Loader instead.

Just a few more pointers when it comes to Excel We’ll show you the file we worked with, and how much time it took to load the data. Now let’s go look at our new table data! I love the sweet smell of data in the morning! But if you have thousands of rejected rows – better to fix at the source. You might be able to edit those manually to fix a few records. Behind that dialog are the INSERT statements we tried to run, but didn’t work.

If there were rows rejected by the database, we’ll see those now. Then you can either fix your data in the Excel file, or make changes to your table so the data will fit/work.Īfter clicking ‘Yes’, we’ll get to the end of our story, and our data! Step 7: See What Worked and What Didn’t But, if you need EVERY single row – you need to say ‘Cancel’ to start over. I’m going to say ‘Yes’ to ignore all the errors. If the Wizard runs into any problems doing the INSERTs, you’ll see this: Remember that funny data i put into the Excel file? That’s causing problems now. Step 6: Verify your settings and GO! The ‘Finish’ button will start the magic.

If you see the little warning graphics next to your Date values in the Data panel, you might have the wrong format. The Oracle Docs can help you define the correct DATE Format Model. If we have guessed wrong, or were unable to figure it out, you’ll need to input this yourself. See the ‘Format’ drop down selector? SQL Developer has defaulted the DATE format string to ‘DD-MON-RR’ – we try to guess based on the rows we’re looking at in that 100 preview window. That ‘ha ha’ value will never make it in as a HIRE_DATE value – unless you’re storing DATES in a VARCHAR2 – and if you’re doing that, you’re doing it WRONG. SQL Developer is treating those value as strings – and YOU need to tell SQL Developer the DATE or TIMESTAMP format to use to be able to convert them. In the excel file, you’re probably going to have some date/time fields you want to move into DATE or TIMESTAMP columns. I’ve polluted my Excel file with some values that I know won’t ‘fit.’ When these rows are encountered in the wizard, they’ll be rejected by the database – but the other rows will come in.Īnd TIMESTAMPS too. If we find a problem, we’ll mark the columns with those ‘warning’ symbols. This is where you will tell SQL Developer what columns in the spreadsheet match up to what columns in the Oracle table.Īnd remember how we set that preview window to 100 rows? We’re peaking at the data, looking for problems as we try to fit it into your table column. There’s a good chance the column order of the Excel file won’t match the definition of your table. If you’re not paying attention and just letting the wizard guide you home, then now is the time to wake up. The information on the right shows where that data is going, and how it will be treated. Step 5: Map the Excel Columns to the Table Columns The left panel represents the columns in the XLS file. You can also modify the column order, which may make the next step a bit easier. This is where you tell SQL Developer what columns are to be used for the import. You may have an Excel file with 100 columns but your table only has 30. Step 4: Select the Excel Columns to be Imported The wizard defaults to all of the Excel columns being used, in the order they’re found in the file. Working with CSV? You’ll get even more methods – great for VERY LARGE data sets. This is a nice alternative if you want to customize the SQL, or if you need to debug/see why the ‘Insert’ method isn’t working. If you choose ‘Insert Script’, the wizard will end with an INSERT Script in your SQL Worksheet. Each row processed in the Excel file will result in an INSERT statement executed on the table we’re importing to. Step 3: Create a script or import automatically As the wizard progresses, we’ll keep the File Contents preview panel handy so you don’t have to alt+tab back and forth from Excel to SQL Developer.įor this exercise the ‘Insert’ method will be used. Use the ‘Skip Rows’ option to get the right data. Sometimes your Excel file has multiple headers, or you may need to only import a certain subset of the spreadsheet. If you uncheck the ‘Header’ flag, the column names will become a new row in your table – and probably fail to be inserted. You can increase it, but that will take more resources, so don’t go crazy.Īlso, does your Excel file have column headers? Do we want to treat those as a row to the table? Probably not. This ‘Preview Row Limit’ defines how many rows you can use to verify the IMPORT as we step through the wizard.

Step 2: Select your input (XLSX) file and verify the data If you’ve ran this wizard before, you can pick files from previous sessions.Īs you select the file, we’ll grab the first 100 rows for you to browse below.
