Field size and import stuff [SOLVED]
Posted: Wed Mar 10, 2010 8:27 am
Hi All,
I'm probably asking noddy questions here that someone has probably answered before but I'm struggling to find them.
1) Is there anyway in the csv import function to strip out the field/column titles (in this instance from excel) before the data is imported?
2) Whenever I export excel to csv and then import it, a blank entry always appears in the table that I have imported the data to. Does anyone know why?
Here's a snippet from the function - Have I missed something that would cause the extra empty row?
3) Is there a way to change the width of a column in the "list" view? I was hoping one of the widget:atts configs would have worked but it doesn't seem to change it for the "list" view.
Thanks
Paul
I'm probably asking noddy questions here that someone has probably answered before but I'm struggling to find them.
1) Is there anyway in the csv import function to strip out the field/column titles (in this instance from excel) before the data is imported?
2) Whenever I export excel to csv and then import it, a blank entry always appears in the table that I have imported the data to. Does anyone know why?
Here's a snippet from the function - Have I missed something that would cause the extra empty row?
- Code: Select all
$record->setValues(
array(
'CompanyReg'=>$CompanyReg,
'CompanyName'=>$CompanyName,
'CustomerType'=>$CustomerType,
'BusinessAddress_1'=>$BusinessAddress_1,
'BusinessAddress_2'=>$BusinessAddress_2,
'BusinessCity'=>$BusinessCity,
'BusinessCounty'=>$BusinessCounty,
'BusinessPostcode'=>$BusinessPostcode,
'AccountManager'=>$AccountManager,
'TotalSites'=>$TotalSites,
'TotalVolume'=>$TotalVolume,
'ProductsContracted'=>$ProductsContracted
)
);
3) Is there a way to change the width of a column in the "list" view? I was hoping one of the widget:atts configs would have worked but it doesn't seem to change it for the "list" view.
Thanks
Paul