You are here

function _sheetnode_phpexcel_import_form in Sheetnode 7.2

Same name and namespace in other branches
  1. 5 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_import_form()
  2. 6 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_import_form()
  3. 7 modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc \_sheetnode_phpexcel_import_form()

@file Import sheetnodes through PHPExcel for xls or xlsx spreadsheets.

1 string reference to '_sheetnode_phpexcel_import_form'
sheetnode_phpexcel_menu in modules/sheetnode_phpexcel/sheetnode_phpexcel.module
Implements hook_menu().

File

modules/sheetnode_phpexcel/sheetnode_phpexcel.import.inc, line 7
Import sheetnodes through PHPExcel for xls or xlsx spreadsheets.

Code

function _sheetnode_phpexcel_import_form($form, &$form_state, $format) {
  $form['#attributes'] = array(
    'enctype' => "multipart/form-data",
  );
  $plugins = sheetnode_phpexcel_get_plugins();
  $form['#plugin'] = $plugins[$format];
  $form['import'] = array(
    '#type' => 'file',
    '#title' => t('!format to import', array(
      '!format' => $form['#plugin']['long-name'],
    )),
    '#size' => 40,
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Submit'),
  );
  return $form;
}