The requirement is we need to create a PL/SQL procedure/function to read and load data from an excel file (.xls) to the database tables.
The columns/fields of table wherein the the data needs to be loaded are:
LineID - Sequence ID
ColumnNum - column number from the excel file
RowNum - row number from the excel file
Value - value of the cell in the excel file
I would like to ask if this is possible? I searched and found that most of the answers is that loading from an external file is possible if the file is in csv format. As for the table format where the data needs to be loaded, the format of the source is the same with the format of the table wherein the data will be loaded.
Thank you in advance.
You can create Oracle Database Gateway for ODBC
https://docs.oracle.com/cd/E18283_01/gateways.112/e12061/configodbc.htm
then you can access your xls just like regular database table using databse link
Related
I want to convert Excel file with multiple sheets to csv at once using logic app , Im able to convert perticular sheet(only 1 at a time) from excel file to csv but not all of them at once. Any help/suggestion would be appreciated
Thanks in advance
Hope you are using Get Tables action, then it returns all the tables in any of the worksheets.
You can now loop in through the output of Get Tables action and use "list rows present in a table" action.
On the Table option Select Enter custom value and Select the dynamic content Name of your previous "Get Tables" action.
As you have already mentioned that you were able to convert one table to csv. The next actions should be inside the same, use FOR LOOP to save the table rows to csv.
Reference: https://learn.microsoft.com/en-us/answers/questions/514894/how-to-convert-excel-file-with-multiple-sheets-to.html
I'm using Laravel 8 and I have uploaded Excel file into the server.
The name of the file is "data.xlsx" and it's stored in /public/uploads.
Inside the data.xlsx there are three columns with data.
In my database I have already created a table called "promos". Inside that table there are three columns: id, name, code.
How can I store the first and the second column data from the data.xlsx file into the "promos" table, specifically name and code column?
is it possible to achieve this without using additional libraries on Laravel?
If you dont want to use library for read excel data and save in database , then you can write it in normal php system with **IOFactory::createReader('Xlsx');
The easy solution is you can use https://github.com/Maatwebsite/ in laravel and their functionality is easy to understand and you can also customize storing the first and the second column data from the data.xlsx file
You can use https://laravel-excel.com/ for easy upload excel data to DB
If you make a data connection to another Excel file or an Access table it will import that data into excel as a Table. This is great! But when I do the same with "From Text" and choose a CSV, it loads no problem, but it loads as a RANGE not a TABLE. This is highly frustrating as I NEED it to be in the table format so that I can take advantage of the dynamic column names.
Am I missing a tickbox somewhere? I'm not opposed to using VBA but it really seems odd that Excel can't do CSV to Table so I'm hoping for a native solution.
I should mention that if it's a VBA solution, it CANT break the workbook. So if I'm doing something like:
=SUMIFS(CSVDATA[SalesDollars], CSVDATA[RepName], "BOB")
It will still work after refreshing.
So you can get around the 'data connection' not creating a table by downloading the MS Excel 2010 plugin (from Microsoft) called Power Query. It's free and is a default feature in MS Excel 2013.
It will allow you to choose to create a Power Query Table from External Data >> From File >> From CSV
Upon doing this, it will create a named table for you and a Power Query object attached to the table. You can use the table itself the same way you normally would - with the Columns as references for formulas.
For instance, the default table that I just created using the steps above was auto-named: Table_ExternalData_1
I can then select it using the normal method in formulas:
=Table_ExternalData_1[Column2]
etc...
Hope that helps.
Can any one please advice what is the best way to compare excel data with data in Oracle and return matching information using c#?
I can create a temp table in oracle database, upload excel data to table and run query to compare data in temp table with actual table and get data.
But let me know if it can be done in any other way.
Ex: I have excel data with vehicle numbers and Oracle has details of vehicles, owner name & address.
I want to get all the information which match vehicle numbers in excel.
please let me know best to do this. It would be great if you can provide sample code.
Thanks in Advance.
You Can do it with fetching excel data in C# code and fetch the data from select query from oracle database and then try to compare it in C# using datatables. You can refere to one of the stackoverflow link Compare Datatables.
and to insert excel data in datatable in C# refer to below linkFetch Excel Data in Datatable
For inserting data from excel to C# Application you have to connect through OLEDB and then fetch the records
How to import data from Excel sheet into a table that has identity seed column? I have a stored proc to INSERT, how do I call it while creating an SSIS package where I mapped the excel columns to the database columns in SQL Server?
You shouldn't need a sproc to do this within SSIS. If you have mapped the Excel Source to the destination, the data flow will do the insert. You may need a data conversion task, since the strings in the Excel data will be unicode and SQL prefers DT_STR.