> For the complete documentation index, see [llms.txt](https://docs.perigee.software/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perigee.software/examples-and-demos/excel-quick-load.md).

# Excel Quick Load

From Data To Analyst In a Few Clicks

## Data Load

Need to take your Excel data and load it into your database to get the analysts started?  &#x20;

Instead of taking weeks to develop a new data pipeline, create structure, and work with the business to load your new client data in, just drop the file in Perigee. We will take care of everything from finding and getting the data loaded, to creating a table in only a few seconds. You’ll be a hero!  &#x20;

#### The Data

Here's a typical messed up Excel file where data is shifted and there are unwanted headers.&#x20;

<div data-full-width="true"><figure><img src="https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FxUmc8moZgFogSykcVEJ7%2Fimage.png?alt=media&amp;token=71108d42-df2c-4c33-92dd-346177f8f547" alt="Excel window showing misaligned data"><figcaption></figcaption></figure></div>

#### The Code

```csharp
using Microsoft.Extensions.Logging;
using Perigee;
using Perigee.Database.MSSQL;
using Perigee.FileFormats.Excel;
using System.Data;

// Visit https://docs.perigee.software to learn more
// Visit https://perigee.software to purchase a license!
PerigeeApplication.App("Excel Load", (c) =>
{
    //Register the "main" connection string to a credential called MSSQL.
    c.RegisterConnectionString("MSSQL", "main");
    
    c.Add("ReadFile", (ct, l) =>
    {
        //Get data from file, sheet 1.
        var tbl = Transformer.TableFromFile("SampleExcel.xlsx", sheetIndex: 1);
        tbl.TableName = "ClientData";
        
        //Load into SQL
        tbl.ProcessToSQL("MSSQL");

        //run once. 
        while (PerigeeApplication.delayOrCancel(10000, ct)) {}
    });
});
```

Taking a peak at our database, we see the data loaded into our new table **`dbo.clientData`**:

<div data-full-width="true"><figure><img src="https://2203366127-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FloJjRj49SSQfSrp7vuw9%2Fuploads%2FY1PibqfjP7QzDEseieu9%2Fimage.png?alt=media&amp;token=2ed32b57-fd41-4ca8-913b-e86379dca4d4" alt=""><figcaption></figcaption></figure></div>

Which came directly from the Excel file linked below

### The associated files:

The <mark style="color:orange;">**`appsettings.json`**</mark> file:

```json
{
  "ConnectionStrings": {
    "main": "data source=host; initial catalog=test; User Id=sa; Password=abc"
  },
  "AppSettings": {
  
  },
  "Perigee": { "HideConsole": false },
  "Serilog": {
    "MinimumLevel": "Debug",
    "WriteTo": [
      { "Name": "Console" }
    ]
  }
}
```

The <mark style="color:orange;">**`SampleExcel`**</mark> file we loaded:

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


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.perigee.software/examples-and-demos/excel-quick-load.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
