pavanpuligandla Posted October 22, 2008 Share Posted October 22, 2008 hii.. i'm developing an online portal for an university, which contain maodules like admin, accounts. admin's job is to enter student,staff records and upload them to the DB.for example, if an exam was conducted for UG, PG students the admin has to enter about 3000 records to the DB.so i didnt find any use of using HTML FRONT END FORMS,now i'm using EXCEL as my front end form with password protection. This predefined EXCEL has around 20 columns like name, branch, year, exam type, area of study followed by subject codes. <b>NOTE: -excel files are constants -rows entered under the excel are also constants like name, branch, year.only marks obtained for concern subjects wil change and if a student promoted to next sem then year will change.</b> my doubt is, any application should save end user's time and effort.so html forms will be time killing, to enter 3000 records individually from html form will take min 40 minutes. if i use html forms, my DB will be a normalized one. as my front end is EXCEL, normaliztion will create more excel sheets and many problems to delete or update single record. so i'vent normalized my DB. by doing this way, end user's time will be saved very much..can anyone tel me whether this idea is a good practise or not.. NOTE: END USER SHOULD NOT AFFECT is my motto./ many thanks, pavan.p waiting for ur opinions guys.. Link to comment https://forums.phpfreaks.com/topic/129526-php-excel-db-help/ Share on other sites More sharing options...
haku Posted October 22, 2008 Share Posted October 22, 2008 Excel as .xls won't work well for you, but if they save the excel as a .csv file, you can read it with php, then explode by ',' and you will have an array with all of the files. Although, if they are going to be using commas at all in their text, it won't work, and you will probably want to use tab separated values or something. Link to comment https://forums.phpfreaks.com/topic/129526-php-excel-db-help/#findComment-671579 Share on other sites More sharing options...
pavanpuligandla Posted October 22, 2008 Author Share Posted October 22, 2008 nop. i wrote php code for pumping the .xls worksheet to mysql DB. if i've tht code workin, y to go for saving as .csv?? no need to save ot as .csv. secondly, if i use excel as front end, then my DB is not a normalized one. will ti be okay? here i'm thinking about saving time and effort.. so, if we normalized the DB, then it'll be very confusing to enter records in multiple sheets for the end user. i'm not using html forms, to implode data to mysql tables.. hope u got me... pls suggest me.. Link to comment https://forums.phpfreaks.com/topic/129526-php-excel-db-help/#findComment-671605 Share on other sites More sharing options...
haku Posted October 22, 2008 Share Posted October 22, 2008 why save to csv? Because if you read the entire file into a variable, for example: $file Then you can separate all the table cells like this; $cells = explode(',', $file); You now have an array with each table cell saved into an element in the array. The top left cell will be $cells[0], the next cell will be $cells[1] etc. Feel free not to use it, but there is a reason why people use .csv files, and don't use excel files. Link to comment https://forums.phpfreaks.com/topic/129526-php-excel-db-help/#findComment-671612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.