This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieve data from Excel sheet for Mysql table

Dear all I have retrieved some data from databases and literature and need to keep this data in a mysql table and display it in a webpage. Data in a excel sheet is like this

coloumn1 coloumn2 coloumn3
geneid1 value1 value2
geneid2 value3 value8
geneid3 value9 value0
geneid3 value7 value0
geneid3 value9 value0

I have loaded it into mysql table and want to make a query such that it display only unique values on a webpage related to coloumn1. like

geneid3 value9 value0 value7
mysql excel perl php

I would suggest just dumping the data to a tabular format such as .tsv or .csv and then importing it into the DB that way. I've got a quick & easy Python script to dump .xlsx using Pandas here

Also it sounds like you have your data in a wide format, I think for a SQL database you might want it in long format instead. I typically use R for processing tabular data, particularly with the reshape2::melt function to convert from wide to long; details here.

Might be more helpful if you posted a small sample of the exact data

My concern is with duplicate values for geneid3.What to do with this?

going to need to see an actual sample of the data to be able to make a suggestion

sharmatina189059 : Please consider validating comments/answers from your past questions (you have posted several by now). Acknowledging help you receive here (by up-voting/accepting answers) is a good way of thanking people.

My apology for the same.. I am very thankful to all..

$iname = "SELECT Gene_name, Pathway_name, Reaction fROM Pathway WHERE Gene_name in (SELECT Gene_name from Pathway GROUP BY Gene_name having count(*) > 1 LIKE '%$find%')";

I am using this command but it is not working...Am I doing something wrong?

0 answers

No answers yet.

Log in to answer this question.