Using codeigniter
's excel class I have displayed data from excel.xls
:
echo $worksheetrows->dump(true,true);
But I am confused how to insert this data to database. Please help me to solve this issue.
A B C D E F G H J
1 Number Formats 123456789.123
2 Format Positive Negative Format 1 Negative Format 2 Negative Format 3 Negative Format 4
3 1234 123456789 -123456789 123456789 (123456789) (123456789) Col I is hidden -->
4 1234.0 123456789.1 -123456789.1 123456789.1 (123456789.1) (123456789.1) This is col J 5 1234.00 123456789.12 -123456789.12 123456789.12 (123456789.12) (123456789.12)
6 1,234 123,456,789 -123,456,789 123,456,789 (123,456,789) (123,456,789)
7 1,234.0 123,456,789.1 -123,456,789.1 123,456,789.1 (123,456,789.1) (123,456,789.1)
8 1,234.00 123,456,789.12 -123,456,789.12 123,456,789.12 (123,456,789.12) (123,456,789.12)
9 $1,234.00 $123,456,789.12 $-123,456,789.12 $123,456,789.12 ($123,456,789.12) ($123,456,789.12)
10 Dates Times Percentages Fonts
11 12/31/2008 11/11/2008 10:55 1/1/09 1:44:59 am 23:00:00 50% Bold
12 02/03/08 10:55:48 am 1/1/09 1:45:00 am 23:30:00 1.23% Italic
13 12/31 10:55:48 1/1/09 1:45:01 am Underline
14 December 31, 2008 12/01/2009 Bold - Italic
15 Wednesday, December 31, 2008 Bold - Underline
16 31-Dec italic - Underline
17 Colors
18 Red Green Blue Yellow Gray Orange Purple Cyan
$data = array(
'title' => 'My title' ,
'name' => 'My Name' ,
'date' => 'My date'
);
$this->db->insert('mytable', $data);
// Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')