I would like to skip some column to write data in CSV when it generate.
Here is my code to generate CSV in magento.
it would be start writing from column no 20 for first row only then continue with first column.
$csv = new Varien_File_Csv();
$csvdata = array();
/* genereate header */
$csvdata[] = $this->getCsvColumn();
$path = Mage::getBaseDir() . DS . 'exportmodel';
if (!is_dir($path)) {
$ioAdapter = new Varien_Io_File();
$ioAdapter->mkdir($path, 0775);
}
$csv->setLineLength(1000);
$csv->setDelimiter(';');
$csv->setEnclosure('"');
$file = $path . DS . 'importmodel.csv';
$csv->saveData($file, $csvdata);
$csvdata
array look like when you save it? Is it a simple array, a 2-dimational one or more?$_columns = array( "Sort order", "Sku", "Title", more title here );
like thiscsvdata