194 Topics

Member Avatar for
Member Avatar for abaddon2031

I have a python code that reads a specific folder for specific files. Once it finds a file that matches the re.split peramiters that it is given it then writes the data to a csv file. The issue is that for every file that it loops through and writes it …

Member Avatar for abaddon2031
0
2K
Member Avatar for flebber

Just looking for a push in the right direction. I am overwhelmed by the choice with python at the moment. What are the best tools for managing consitent ETL operations with data in XML and CSV formats to database, graphs and in future a web app. for example should I …

Member Avatar for Yamil_1
0
658
Member Avatar for ashalatha

Controller: $data['error'] = ''; //initialize image upload error array to empty $config['upload_path'] = './uploads/'; $config['allowed_types'] = 'csv'; $config['max_size'] = '10000'; $this->load->library('upload', $config); // If upload failed, display error if (!$this->upload->do_upload()) { $data['error'] = $this->upload->display_errors(); $data['mainpage']='category'; $data['mode']='addcsv'; $this->load->view('includes/mainpage',$data); //Category Id Category Name Sub-category Id Sub-category Name } else { $file_data = …

Member Avatar for veedeoo
0
279
Member Avatar for Tensigh

Hello, The code below works almost perfectly except for two flaws: 1. It provides the full name of the file (workbook.xls) instead of just "workbook" 2. If there is more than 1 worksheet then the loop appends the previous worksheet to the filename. For example, Workbook1 has 1 worksheet Workbook2 …

Member Avatar for Tensigh
0
394
Member Avatar for kingwash

//exporting to csv file. // this is my code. <?php // Database Connection $host="localhost"; $uname="root"; $pass=""; $database = "db_name"; $connection=mysql_connect($host,$uname,$pass); echo mysql_error(); //or die("Database Connection Failed"); $selectdb=mysql_select_db($database) or die("Database could not be selected"); $result=mysql_select_db($database) or die("database cannot be selected <br>"); // Fetch Record from Database $output = ""; $table = …

Member Avatar for chaitu11
0
3K
Member Avatar for oren.turgeman.9

hello i need to replace data only in one(specific ) column of csv file for example replace just in city column f_name,l_name ,city,country --->headers david,d,los-ang''elses,california ( replace los-ang''elses to los-ang'elses) ''-->' g''armin ,dsdsd,new-york,sdasdas my code is replace all the data in file , but i need to replace specific column …

Member Avatar for tinstaafl
0
579
Member Avatar for abra_ka_dabra

Is there ay inbuilt method to convert 2D array into CSV file? e.g. Can anyone give me a hint to convert [1,2;3,4] into a file output.csv?

Member Avatar for howemonster
0
408
Member Avatar for abaddon2031

I have a python script that reads a csv file and converts it to two new files so that my database can add new emails or update existing ones. What im trying to do now is after it has converted them for it to send me a email with how …

Member Avatar for abaddon2031
0
387
Member Avatar for nadiam

hey guys so ive been asked to add an import csv function to my contacts page. <?php require "connection.php"; if ($_FILES[csv][size] > 0) { //get the csv file $file = $_FILES[csv][tmp_name]; $handle = fopen($file,"r"); if ($data[0]) { mysql_query("INSERT INTO contact (fname,lname,email) VALUES ( '".addslashes($data[0])."', '".addslashes($data[1])."', '".addslashes($data[2])."' ) "); } } …

0
159
Member Avatar for APHutchins

Hiya, I want a simple register, but really struggling with the code. I am simply not a coder, although I can process some. Here's one example: <body> <table width="1000" height="450" border="0"> <tr align="center"> <td height="150" colspan="2"><p class="Welcome">Please Select your course:</p></td> </tr> <tr align="center"> <td><form id="form1" name="form1" method="post" action="index.html"> Course: <select …

0
160
Member Avatar for abaddon2031

I have a very large csv file that had different values for certian fields and im wanting to split it up so that each of the different values gets put into its own csv file for example all of the fields whos value is 1110 would get read and written …

Member Avatar for rrashkin
0
225
Member Avatar for abaddon2031

I have a python code that reads several csv files and writes teh data to a single file but every time it loops back around to the next file it prints the headers again. Is there a way to stop this I can post my code if it is nessisary.

Member Avatar for abaddon2031
0
280
Member Avatar for Thevenin

I am trying to order by date DESC some events read from a CSV and print out them. The CSV file has to be read until it reaches the end and then order by date DESC only the entries in the following categories: champions and euro. This is the code …

Member Avatar for Thevenin
0
2K
Member Avatar for joshmac

I have some code that I edited for importing csv into mysql using PDO to bind parameters. I thought it was working before, but tested it again and the issue I have is that only one line (the fourth line) of the csv file is getting imported. The first line …

Member Avatar for joshmac
0
358
Member Avatar for karmstrong

I'm wondering if anyone has any experiencing getting a python application to authenticate with google docs. I'm not sure how to begin. Goal: To update a google docs spreadsheet based of a CSV file on my local machine. Currently my google account is set for two factor authentication. Perhaps this …

Member Avatar for dashing.adamhughes
0
249
Member Avatar for karmstrong

I'm attempint to write a python application that will open a .csv file and look at comun one for certain string. If the string match print the row to a new .csv file. import csv input_file = csv.DictReader(open("stats.csv")) for row in input_file: print row

Member Avatar for Gribouillis
0
566
Member Avatar for krnaveen14

I need to code a program to compare the datas in .csv file (.csv file is an excel file which will be seperated by , instead of cells by saving in.csv format). I've coded it fully and the required outout is also obtained. But i need a modified version of …

Member Avatar for JamesCherrill
0
285
Member Avatar for neha05

I am inserting the csv file into the database but it not inserting in proper way,the coloums are merged into each other,im not getting where im doing mistake .please help me in that my code`Inline <?php //database connection details $connect = mysql_connect('localhost','root','123456'); if (!$connect) { die('Could not connect to MySQL: …

Member Avatar for neha05
0
352
Member Avatar for eddstyson

i have managed to code this CSV file and it is working well..the only problem i am getting is the variable error on the form..i get this error ...Notice: Undefined variable: data in C:\xampp\htdocs\helper.php(527) : runtime-created function on line 22 how do i resolve the error? this this my sample …

Member Avatar for eddstyson
0
238
Member Avatar for neha05

plugin for admin panel in which user can login on its ftp details and download all files(.csv I have Ingram Micro products details) and show only check information on sites.so any plugin is available for that ??

Member Avatar for neha05
0
165
Member Avatar for Abdul Waseem

Read first row from csv file and create table automatically according to it(csv file fields) in mysql. Looking for PHP script? I have tried this. <?php $arr = array(array(),array()); $num = 0; $row = 0; $handle = fopen("./contacts.csv", "r"); while($data = fgetcsv($handle,1000,",")){ $num = count($data); for ($c=0; $c < $num; …

Member Avatar for Bachu
0
5K
Member Avatar for RikTelner

Hi there. I was kinda researching on how I could store data at best (in my opinion). I came on "CSV" files. Which looked great to use. I found out there are two functions that can operate file. So I keep Googling on how to use the syntax and how …

Member Avatar for cereal
0
278
Member Avatar for ddanbe

The test.txt file I'm using is: 1,2,3,Name1,Pizza,Pizza Hut,7,8,9 1,2,3,Name2,goose,my home,7,8,9 1,2,3,Name3,chicken,airplane,7,8,9 Most of the explanation can be found in the snippet. Some CSV(Comma Separated Value) files often contain as first line, a header. You could skip this, or threat it a bit differently. I had no header, so I leave …

Member Avatar for deceptikon
0
3K
Member Avatar for Kratoswoo

using (StreamReader readFile = new StreamReader(filepath)) { string line; while ((line = readFile.ReadLine()) != null) { textBox1.Text = textBox1.Text + line + Environment.NewLine; } } This is what I have so far. I have tried using .Split to try to seperate them but do not know much about it. So …

Member Avatar for ddanbe
0
231
Member Avatar for Kratoswoo

So What I am trying to do it take a CSV file take what is in it and diplay it in a big textbox or txt file. String[] lines = File.ReadAllText("**").Split(','); foreach (string line in lines) { textBox1.Text = line; } That is what I have so far. Issues is …

Member Avatar for Kratoswoo
0
169
Member Avatar for VUEKID

Need help reading a csv to NSString and then to NSMutableArray. I need to output the name of a certain row base on car. file ex: car, bike, wheels toyota, mountainbike, rims .. .. ..

Member Avatar for hericles
0
214
Member Avatar for PriteshP23

Hello, I have one tar.Z file. I have to run shell script **daily** as it is required to update the database. customer_yyyymmdd_hhmi.tar.Z sales_ yyyymmdd_hhmi.csv (5 MB - 20 MB) purchase_ yyyymmdd_hhmi.xml (650 MB - 950 MB) I have made small part of XML file. There are 4 parts. There is …

Member Avatar for PriteshP23
0
368
Member Avatar for EdwardVX

Hi DaniWeb! I kinda need your help on this little bugger. How can I input this CSV file in to an array? Module Name, Module Code -- Student ID, Last Name, First Name, Exam Score, Average Introduction to Art Life, ITAL 07,Krave,Mark,27,30 60,Lever,Paul,89,96 13,Green,Jon,15,40 15,Davids,Jerry,5,15 If the Module Name and …

Member Avatar for JamesCherrill
0
590
Member Avatar for prashant.tiwari.737

Hi, I want to import only zip codes (inside csv) into one of table inside mysql database. All zip codes are in a csv file. When I run PHP code it works only with first zip code. Can somebody please help me on this where I am doing mistake. Here …

Member Avatar for cereal
0
190
Member Avatar for muzique18

I already have a php file that catches data from an uploaded CSV file to MySQL but the problem is, every time I upload the csv file, it duplicates the data into the MySQL What i really want is, if I uploaded the first csv file, and edit some data …

Member Avatar for broj1
0
315

The End.