View Full Version : Table format
colby2152
05-13-2009, 04:02 PM
I am very new to databases in general. I have a spreadsheet that I want certain cells, rows, and columns to be accessed through some scripts. Short of learning how to do all of that, what kind of format do I need my Excel CSV file to be in? For example, can I have html code in the spreadsheet cells?
Fumigator
05-13-2009, 05:24 PM
You can store anything in a database, so yes, HTML would be fine. One thing to keep in mind is you want to escape data so the quotes and double quotes get stored correctly and you avoid SQL injection issues. MySQL has a function which will do this escaping for you. In PHP, for example, this function is called mysql_real_escape_string(). You need to run each of your pieces of data through this function before it gets inserted into a database table.
A browser is a little more picky as far as what characters it can handle, and you get into a whole thing with character sets and encoding (http://en.wikipedia.org/wiki/Character_encoding), but for most applications you won't have a problem.
Good luck to you!
Old Pedant
05-13-2009, 07:45 PM
*IF* you are using a Windows server, you don't need to use CSV file, at all. You can simply treat any spreadsheet in an Excel ".xls" file as if it were a table in a database. You can do this using the Microsoft Jet OLEDB driver.
What server-side language/system are you using?? ASP? ASP.NET? PHP? JSP?
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.