194 Topics
| |
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 … | |
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 … | |
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 = … | |
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 … | |
//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 = … | |
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 … | |
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? | |
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 … | |
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])."' ) "); } } … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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: … | |
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 … | |
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 ?? | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 .. .. .. | |
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 … | |
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 … | |
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 … | |
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 … |
The End.