Excel to mysql? [closed] - mysql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I've seen a lot of questions here about how to export a sql database to excel, but I have a ton of information from an excel file that I would like to export to sql database. The file is extensive and it could take me years to transfer the info manually... years! Is there a faster easier way to do this?

You don't actually need to write code to do this.
Save the Excel file to CSV format and then see one of the many related questions:
How to import CSV file to MySQL table
How I can Import data from CSV to MySQL?
Import CSV file directly into MySQL
The friendliest way is to use a graphical tool like HeidiSQL to match up the excel columns to the columns in your database.

You can use apache poi library to read the excel file line by line and jdbc to create connection to mysql database and execute insert statements.
In my project I used jruby with nurettin-jruby-poi fork of the jruby-poi gem to read the excel file and activerecord to insert the data into mysql.

Write a .NET Program (Console is simpler)
Access the Excel Worksheet/Workbook
Copy the Attributes and create appropriate Tables for the sheets in your Excel
Now copy the contents to SQL Tables appropriately
Since it is automated it will be faster

As Colin Pickard said, you can use CSV format that can be directly imported.
If you're using PHP, you can use the PHPExcel library here which can do the job !
Btw, you should tell us if you're using a certain language..

You can use a GUI Data Import tool, it supports direct import from *.XLS and *.XLSX (Excel 2007) files.

Use Talend Open Studio to visually design and then automate any kind of data integration job.
http://www.talend.com/index.php

My favorite tool for converting excel sheets into mysql database...
Full disclosure, I am the author.
http://excel2mysql.net

creating a CSV is better.
if we use CSV method we can export any character sets(unicode) also
ones we create a CSV file then, just use LOAD method available in mySql.
load method is used to import data to mysql directly(using sql query).
LOAD local permit you to import data from any location in your local machine

Related

How to Import a CSV file into an entity automatically?

Is there a way to import a CSV file into a CRM record automatically, say when the CSV file is created?
The plan is that this CSV file would have some cost center hours inside and job number which corresponds to a certain record already created in CRM.
And uploading this CSV would then update this record.
Please help me to solve this problem
You can import data both using UI and code in D365.
Also there are plenty of tools solving exactly same problem: KingswaySoft SSIS, Scribe, etc.
But it looks like buying 3rd party software might be overkill in your scenario. You can use Windows task scheduler and write a few PowerShell scripts to implement it.
Where to start:
https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/import-data
https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/sample-import-data-complex-data-map
https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell
https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/define-alternate-keys-entity

Kony Datagrid Export

Is there any way to export data from a Datagrid to a CSV file or some kind of Excel format in Kony Visualizer?
I'm developing the application for a Desktop platform. There was a similar question asked earlier by someone else on Kony Base Camp, but it was never answered. Here is the unanswered question I'm referring to, particularly question 2.
https://basecamp.kony.com/s/question/0D56A00000RZXw7SAH/reg-pdf-viewingexporting-options-for-desktop-and-spa
You can achieve this using the platform-specific FFI libraries. You can utilize Kony Fabric to create a service that exports excel, word, or PDF documents.

How to import PostgreSQL into MySQL database? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I have dumped a PostgreSQL database and I would need it to a MySQL as we migrate our project from Heroku to Amazon EC2, where is MySQL.
It's quite a long time when I was doing something similar like raw dumps & SQL queries, so I would like to ask you for help how to make this as smoothly as possible.
I dumped a PostgreSQL database. When I open the file, there are some PostgreSQL commands, table structures and data that belongs to those tables. On the other hand, I have on EC2 a MySQL database with created tables (the same tables as are in the PostgreSQL dump - but all MySQL tables are empty). My goal is to populate the MySQL tables with data from PostgreSQL tables.
How to do that?
As of 6 days ago Amazon started offering a hosted PostgreSQL service as part of their Relational Database Service. I would seriously considering importing straight back into PostgreSQL and skipping MySQL altogether. Changing to a different DBMS is always more pain than it's worth.
You can import your dump by running it using psql, like this: psql -f <backup_filename> <target_db>. See Amazon's docs for more
If you're really set on migrating to MySQL you can try a simple tool like openDBcopy or something more comprehensive (and complicated) like Talend Studio.
If you have text file created by pg_dump then in this file you can see data from source database as COPY command or as series of INSERT commands. Both should be easy to import to any other database. Maybe you will have to change string representation of dates. COPY format is simply CSV and for this you will have to write import program, for example Jython: Python language that can work with JDBC drivers. With Jython you can easily parse CSV data and import it into destination database using JDBC PreparedStatement with proper INSERT.
If you have connection to both databases at once you can "pump" destination database using various tools. As Jython fan I simply use JDBC with code like:
insert_stmt.setObject(i, rs_in.getObject(i))
where insert_stmt isprepareStatement() with INSERT... and rs_in is record set of executeQuery()

Alternative to exporting to csv export

I need an alternative to exporting to a csv file. Basically, the requirement is to be able to allow the user to edit any amount of data from the database. Currently, the option is to export the data to csv and then the user can update them in Microsoft Excel. Thus, one can edit it without actually needing to have our web application installed. However, we are trying to avoid this approach due to some issues we encountered with working with CSV on Excel. Can someone recommend an alternative solution?
Most programming languages have libraries to allow you to import/export excel directly which avoids many of these issues. This means you won't have to tell you users to do special Save As when saving their files.
Java: http://poi.apache.org
Ruby: http://spreadsheet.rubyforge.org or http://roo.rubyforge.org
Google can provide options for other languages.

How to export an entire Access database to SQL Server? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I've just got a lovely Access database, so the first thing I want to do is to move it over to a normal database management system (sqlexpress), but the only solution I've found sounds like craziness.
Isn't there an "export database to .sql" button somewhere? I have around 50 tables and this export might run more than once so it would be great if I didn't have to export all the tables manually. Generating a .sql file (with tables creation and inserts) would also be great since it would allow me to keep that under version control.
I guess if it's not possible to do something simple like this I'd appreciate any pointers to do something similar.
Is there a reason you don't want to use Management Studio and specify Microsoft Access as the data source for your Import Data operation? (Database->Tasks->Import, Microsoft Access as data source, mdb file as parameter). Or is there a reason it must be done from within Microsoft Access?
There is a tool from the SQL Server group - SQL Server Migration Assistant for Access (SSMA Access) There have been comments stating it's a better tool than the Upsizing Wizard included in Access.
A quick-and-dirty way to upsize Jet/ACE tables to any ODBC-accessible database engine:
create an ODBC DSN for your database.
in Access, select a table, and choose EXPORT from the file menu. Choose ODBC as the type and then select your DSN.
This will export the table and its data with data types that your ODBC driver indicates are most compatible with Jet/ACE's data types. It won't necessarily guess right, and that's why you likely wouldn't do this with SQL Server (for which there are tools that do better translating). But with non-SQL Server databases, this can be an excellent starting place.