Download MySQL table as a spreadsheet - mysql

How do you download an sql table as an Excel spreadsheet?
Any help would be appreciated.
Thanks

Use a SELECT ... INTO OUTFILE ... statement to write a CSV file or a tab-delimited file that you can open directly in Excel.

Navicat, MySQL Workbench and phpMyAdmin would all work if you want to create the spreadsheet yourself.
To allow users to download spreadsheets from a website, you can use a library. Some good options are:
IIS:
EPPlus http://epplus.codeplex.com/ or NPOI http://npoi.codeplex.com/
Apache:
PHP Excel (http://phpexcel.codeplex.com/) or Apache POI (http://poi.apache.org/)

Use phpMyAdmin, it has option of exporting thata to multiple formats:
csv,scv for excel, json, doc, latex, wiki table, odf, pdf, sql

Use a database client like Navicat.

Related

How can i import .DMP files into SQLiteStudio

i need to import some .DMP files into SQLiteStudio, i tried a lot of things but canĀ“t find how to do it. If you can help me i appreciate it
You cannot import MySQL dump files into SQLite database. You need to first convert it into a format understandable by SQLite. There are several tools over the internet for doing so - just type "convert mysql dump into sqlite" in google or other search page. An example of such tool: https://github.com/dumblob/mysql2sqlite
Once you have the file compatible with SQLite, you can open SQLiteStudio, create an empty database and then right-click on it, pick "Execute SQL from file" and use the SQLite-compatible file you produced earlier.

parse.com export database table into *.csv stored in parse cloud

How can I export the one database table from parse.com into a *.csv file which is stored in parse online?
I just once got a file in the following format and now I need to do that on my own:
http://files.parsetfss.com/f0e70754-45fe-43c2-5555-6a8a0795454f/tfss-63214f6e-1f09-481c-83a2-21a70d52091f-STUDENT.csv
So, the question is how can I do this? I have not found a dashboard function yet
Thank you very much
You can create a job in cloud code which will query through all the rows in the table and generate CSV data for each. This data can then be saved to a parse file for access by URL.
If you are looking to simply export a class every once in awhile and you are on a mac, check out ParseToCSV on the Mac App Store. Works very well.

How does phpmyadmin writes a table in a pdf file?

There is an export option in phpmyadmin which can be used to write a database table in a pdf file. How does phpmyadmin do that? Basically, what I am asking is if I want to write a table in pdf using command prompt then how can it be done? Is php required somehow to do it or it can be done purely using MySQL command prompt?
You can store the results of a query to a text file like this:
SELECT * from someTable
INTO OUTFILE 'file.txt'
(See: http://www.tech-recipes.com/rx/1475/save-mysql-query-results-into-a-text-or-csv-file/)
From there, you can use enscript and ps2pdf to convert the text to a pdf
enscript file.txt --output=- | ps2pdf - > file.pdf
(See: a light solution to convert text to pdf in Linux)
That's one possible way to do it.
There is no capability within SQL to write to a PDF. phpMyadmin uses php to do this. It's open source so you can look at the code if you want
However, rather than copying the method used by phpMyadmin, if you want the capability to do this, I recommend looking into tcpdf or fpdf, which are php libraries designed to handle this. Take a look here: http://sourceforge.net/projects/tcpdf/

Exporting a Mysql database to Access?

I see there are multiple ways to do exports from mysql - the list phpmyadmin provides is given below:
I vote for the easiest way. For example I can get a .sql file from the SQL option but I don't know where to go from there. Likewise I can get a .php file but I don't know how to parse it from there into Access. Thanks!
Codegen, CSV, CSV for MS Excel, MS Word 2000, latex, Media Wiki Table, Open Document Spreadsheet, Open Document Text, PDF, PHP Array, SQL, Texy text, Excel 97-2003, Excel 2007, XML, YAML
Export Working: PHP Array(.php), SQL (.sql)
Export Not Working: XML
Ambiguous: Excel 2007
I would install a MySQL ODBC driver, create a DSN pointing to your MySQL database, then use the Access UI option to import from ODBC. If you want a code approach, use the DoCmd.TransferDatabase Method
Alternatively, you could create ODBC links in Access to your MySQL tables, then run "Make-Table" queries to create Access copies of those tables:
SELECT * INTO new_access_table
FROM mysql_linked_table;

How to extract data from excel file into the database in Mysql at runtime in asp.net?

I am creating a website...and i want to give a liberty to users, to upload the data of excel file and then i want to save that excel data inside mysql database on runtime...
kindly help me in performing this task...
you can mail me at...."amiteshsinha09#rediffmail.com"
thank you
Amitesh
You can query the data in the excel sheet using Open Xml
Using this instead of running Excel via interop is both faster, more stable and saves you licence costs.