> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/mgramseva/introducing-mgramseva/enablement-toolkits/setting-up-services/loading-consumers-for-mgramseva.md).

# Loading Consumers For mGramSeva

## Overview

This page provides step-by-step instructions for using a Python script to create consumers for mGramSeva. Follow these guidelines to load consumer data into the system using the Python script provided.

## Steps

#### Step 1: Prepare Excel Sheet

Before running the script, ensure you have a properly formatted Excel sheet. The sheet should include the following columns:

* Consumer Name (Mandatory, use "NA" if not available)
* Gender (Male/Female)
* Father Name (Mandatory, use "NA" if not available)
* Mobile Number (Mandatory)
* Old Connection Number
* Property Type
* Service Type (till now in we have Non-metered only for data loading)
* Ward (Always set to "Ward 1")
* Meter Reading (If available, use provided date; otherwise, default to "12/01/2022")
* GPWSC Name
* Arrears
* Previous Reading ((if arrears and previous reading are not given, write '0')

Ensure the format of the meter reading matches the provided sample format given in excel file below, as incorrect formatting may lead to loading failures.

### 2. Python Script Configuration

Edit the Python script with the following details:

* Set the host URL based on whether it's for production, QA, or UAT.
* Provide the username and password corresponding to your host URL.
* Specify the path where your Excel file is stored. It is recommended to store the Excel file in the same location as your Python script.

### 3. Running the Script

Execute the Python script after configuring the host URL, username, password, and file path. The script will load data into mGramSeva based on the information provided in the Excel sheet.

### 4. Post-Execution Steps

Do not open the Excel file until the script completes its task. After completion, open the Excel file to check the status. The status will indicate whether the operation was successful or if there was a failure. If there's a failure, refer to the provided reason for further investigation and resolution.

{% file src="/files/yw3yMH6yXfXA2cAkBJCy" %}

{% file src="/files/HFmGB2mqTiZPt9H6iJNq" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/mgramseva/introducing-mgramseva/enablement-toolkits/setting-up-services/loading-consumers-for-mgramseva.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
