Extract Data From Csv?

Page 1 of 1

13 Replies - 6469 Views - Last Post: 24 June 2013 - 05:39 AM Rate Topic: -----

#1 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Extract Data From Csv?

Posted 18 November 2002 - 05:54 PM

Any one have some ideas as to how one could extract a value from a CSV file and put it in a DB?

Thanks,
Is This A Good Question/Topic? 0
  • +

Replies To: Extract Data From Csv?

#2 arniie  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 999
  • Joined: 08-October 02

Re: Extract Data From Csv?

Posted 19 November 2002 - 02:09 AM

Can't you just open the csv file with ms excel and then input it into the database with an insert/update sql statement
Was This Post Helpful? 0
  • +
  • -

#3 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: Extract Data From Csv?

Posted 19 November 2002 - 08:30 AM

arniie, on Nov 19 2002, 06:09 AM, said:

Can't you just open the csv file with ms excel and then input it into the database with an insert/update sql statement

The file has 1000's of entries and I only need one collum, I'd rather only put those in the correct table than have to put the whole thing in and select out a row and put that row where I need it. Plus I want to figure out how to do this. :P
Was This Post Helpful? 0
  • +
  • -

#4 arniie  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 999
  • Joined: 08-October 02

Re: Extract Data From Csv?

Posted 19 November 2002 - 09:13 AM

I'm not sure if its me not understanding what YOU mean or the other way round.

Open the CSV file extract the data (colomn) you want make new csv file and upload that ?!

No.... :blink:
Was This Post Helpful? 0
  • +
  • -

#5 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: Extract Data From Csv?

Posted 19 November 2002 - 04:07 PM

It's not set up that way, every 4th line is the one I want, it's a weird CSV file.
Was This Post Helpful? 0
  • +
  • -

#6 arniie  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 999
  • Joined: 08-October 02

Re: Extract Data From Csv?

Posted 20 November 2002 - 02:15 AM

I'm probably pissing you off with this 'excel' talk ....

but if its every 4th line, you could use an excel formula/expression to extract every fourth line
Was This Post Helpful? 0
  • +
  • -

#7 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: Extract Data From Csv?

Posted 20 November 2002 - 01:21 PM

arniie, on Nov 20 2002, 06:15 AM, said:

I'm probably pissing you off with this 'excel' talk ....

but if its every 4th line, you could use an excel formula/expression to extract every fourth line

Ok, and how would I do that. I have excel so I can open it in that but I have used it like twice in my H.S. typing class (6 years ago).
Was This Post Helpful? 0
  • +
  • -

#8 fyrestorm  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 10
  • View blog
  • Posts: 3,113
  • Joined: 04-April 02

Re: Extract Data From Csv?

Posted 20 November 2002 - 01:47 PM

ok, let me see if i can help, you don't want a column, you want every 4th row?
Was This Post Helpful? 0
  • +
  • -

#9 arniie  Icon User is offline

  • D.I.C Addict

Reputation: 0
  • View blog
  • Posts: 999
  • Joined: 08-October 02

Re: Extract Data From Csv?

Posted 20 November 2002 - 01:51 PM

fyrestorm: yes he does

RDS: do you know anything about macro's?
Was This Post Helpful? 0
  • +
  • -

#10 fyrestorm  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 10
  • View blog
  • Posts: 3,113
  • Joined: 04-April 02

Re: Extract Data From Csv?

Posted 20 November 2002 - 02:08 PM

there's got to be something common in those every 4th row, and if that's the case you can do a sort then just cut and paste that data into a new workbook, save as a csv and then import it into phpmyadmin
Was This Post Helpful? 0
  • +
  • -

#11 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: Extract Data From Csv?

Posted 21 November 2002 - 03:01 PM

fyrestorm, on Nov 20 2002, 06:08 PM, said:

there's got to be something common in those every 4th row, and if that's the case you can do a sort then just cut and paste that data into a new workbook, save as a csv and then import it into phpmyadmin

I'm gonna work on this way.
Was This Post Helpful? 0
  • +
  • -

#12 fyrestorm  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 10
  • View blog
  • Posts: 3,113
  • Joined: 04-April 02

Re: Extract Data From Csv?

Posted 21 November 2002 - 03:33 PM

let me know if you need any help, i'm good at this sort of stuff
Was This Post Helpful? 0
  • +
  • -

#13 murume  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • Posts: 50
  • Joined: 21-June 11

Re: Extract Data From Csv?

Posted 24 June 2013 - 05:08 AM

If it's something that your going to be doing often then you definitely need a script for that. I'm not yet good a PHP and I don't know if my solution will work. Why don't you try using the fgetcsv. In the example listed on that PHP.net page there is a line that increments $row. What if you increment it by 4?
Was This Post Helpful? -1
  • +
  • -

#14 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6091
  • View blog
  • Posts: 23,605
  • Joined: 23-August 08

Re: Extract Data From Csv?

Posted 24 June 2013 - 05:39 AM

This topic is almost 11 years old.

Quote

Re: Extract Data From Csv?

Posted 21 November 2002 - 06:33 PM


WHY DID YOU FEEL THE NEED TO RESPOND???

Closed.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1