public function FeedsExcelParser::configForm in Feeds XLS 7
Build configuration form.
File
- ./
FeedsExcelParser.inc, line 184
Class
- FeedsExcelParser
- Parses a given file as a Excel file. This is heavily inspired by Feeds very own CSV parser.
Code
public function configForm(&$form_state) {
return array(
'all_worksheets' => array(
'#type' => 'checkbox',
'#title' => t('All worksheets'),
'#description' => t('Check this box if you would like to import data from all worksheets, and not just the first sheet.'),
'#default_value' => $this->config['all_worksheets'],
),
'max_rows' => array(
'#type' => 'select',
'#title' => t('Maximum number of rows'),
'#description' => t('Select the maximum number of rows your Excel file contains. This number MUST be greater than the total number of rows in your file. Selecting this value will improve the progress bar feedback.'),
'#default_value' => $this->config['max_rows'],
'#options' => array(
100 => 100,
1000 => 1000,
5000 => 5000,
10000 => 10000,
20000 => 20000,
30000 => 30000,
40000 => 40000,
50000 => 50000,
65535 => t('65535 XLS Maximum'),
1000000000000 => t('Unlimited. NO PROGRESS FEEDBACK'),
),
),
'chunk_size' => array(
'#type' => 'select',
'#title' => t('Number of rows to read in per pass'),
'#description' => t('Select the number of Excel rows to read in per pass. The default should be fine in most cases, but if using a complex processor, you may need to reduce the number.'),
'#default_value' => $this->config['chunk_size'],
'#options' => array(
1 => 1,
2 => 2,
5 => 5,
10 => 10,
20 => 20,
30 => 30,
40 => 40,
50 => 50,
),
),
'use_chunk_reader' => array(
'#type' => 'checkbox',
'#title' => t('Use chunk reader'),
'#description' => t('For most content this should be left checked. If you have functions/equations that act across many rows (e.g. a SUM() of a column, then you may need to uncheck this box.'),
'#default_value' => $this->config['use_chunk_reader'],
),
);
}