Views change "Exclude from display" at run-time
You need to save your view with hidden fields and then load it again

&lt;?php

function test () {
  // Loading arbitrary node
  $node = node_load(44165);

  $select_fields = array();
  foreach ($node-&gt;field_export_select_fields[LANGUAGE_NONE] as $key =&gt; $value) {
    $select_fields[] = $value['value'];
  }

  $name = 'MY_VIEW_NAME';
  $display = 'views_data_export_1';
  $view = views_get_view($name, TRUE);

  // Hide selected fields.
  foreach ($view-&gt;display['views_data_export_1']-&gt;display_options['fields'] as $key_field =&gt; $value_field) {
    if (in_array($key_field, $select_fields)) {
      $view-&gt;display['views_data_export_1']-&gt;display_options['fields'][$key_field]['exclude'] = 1;
    }
    else {
      $view-&gt;display['views_data_export_1']-&gt;display_options['fields'][$key_field]['exclude'] = 0;
    }
  }

  // Save view.
  views_save_view($view);
  // Load updated view.
  $view = views_get_view($name, TRUE);
  $view-&gt;set_display($display);

  // Gets the exposed filters.
  $exposed_filters = $node-&gt;field_views_filter[LANGUAGE_NONE][0]['settings'];
  $view-&gt;set_exposed_input($exposed_filters);


  $output = $view-&gt;preview();

  $file_string = 'sites/default/files/private/' . time() . '.xls';
  file_unmanaged_save_data($output, $file_string, FILE_EXISTS_REPLACE);

  $view-&gt;destroy();
}