Title: Make spreadsheet editable for visitors
Last modified: August 20, 2016

---

# Make spreadsheet editable for visitors

 *  [fhsouza](https://wordpress.org/support/users/fhsouza/)
 * (@fhsouza)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/make-spreadsheet-editable-for-visitors/)
 * Hi guys, I want to make this spreadshit editable even for visitor in my web site.
   I just dont know where to change this role.
    I tried to do this:
 * $available_to = Array(
    ‘administrator’ => true, ‘editor’ => true, ‘author’ =
   > true, ‘visitor’ => true
 * But its not working.Here is the original code:
 * ———————————————————————
    error_reporting(0); require_once(‘../../../wp-config.
   php’); define(‘WP_USE_THEMES’, true); require_once(“./codebase/php/grid_cell_connector.
   php”);
 * $res = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
    mysql_select_db(DB_NAME,
   $res);
 * get_currentuserinfo();
    if (isset($current_user->roles[0])) { $usertype = $current_user-
   >roles[0]; } else { $usertype = ‘guest’; }
 * $available_to = Array(
    ‘administrator’ => true, ‘editor’ => true, ‘author’ =
   > true
 * );
 * $conn = new GridCellConnector($res, $table_prefix.”dhx_”);
    if (!isset($available_to[
   $usertype]) || $available_to[$usertype] == false) $conn->set_read_only(true);
   $conn->render();
 * ?>
    ——————————————————–

The topic ‘Make spreadsheet editable for visitors’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [fhsouza](https://wordpress.org/support/users/fhsouza/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/make-spreadsheet-editable-for-visitors/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
