# Using External Data : Working with CSV Format

## Prelude

In the previous chapter, we've seen how to get historical market data from Google Finance API.

We used `GOOGLEFINANCE()` function to get NASDAQ ticker data, over a given period of time.

However, you might have also noticed that this is not a *highly* *available* function. Often it can error out, and we might have to manually fix these `#NA` errors.

This is true for most publicly freely available APIs - it'd either be rate-limited, or not always be available.

In the real world, when we want to achieve something solving a common pain-point, external data might not be always available from a REST (or SOAP) API endpoint. It might not even be desirable to have it be available from a REST endpoint.

Imagine if the problem statement were to compare your portfolio performance against that of an index.

In that case, there would be two aspects to this exercise:

* importing your existing transaction history
* simulating purchase or sell transactions against an index

The first aspect - *importing your existing transactions* - might not be available from an API endpoint.

You might be using a broker or distributor or advisor, who provides you a transaction reports in a specific format, periodically.

Basically, you’d have a file which has your transactions in a specific format, and before you run any operations on that; you’d have to import that into your spreadsheet.

We could, for instance, just open the file and copy-paste data from there into our spreadsheet. But this can be error-prone, and might require more work.

Fortunately, most spreadsheet / excel applications have in-built functionalities to do a *best-effort* import for common data formats that your broker / distributor / advisor would typically use to send you these transaction histories.

We'd go over some interesting calculations that can be done upon your transaction history, that's available in CSV format, in these chapters:

{% content-ref url="/pages/-MWlBNi95OS1lxgDXKsy" %}
[CSV Format](/excel/using-external-data-working-with-csv-format/csv-format.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MWlMKom24x6z7Fx9ckL" %}
[Computing LTCG Eligible Equity Units](/excel/using-external-data-working-with-csv-format/computing-ltcg-eligible-equity-units.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MWld06RxyOm5klainbs" %}
[Process for Estimating Tax](/excel/using-external-data-working-with-csv-format/process-for-estimating-tax.md)
{% endcontent-ref %}


---

# Agent Instructions: 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:

```
GET https://www.indiainvestments.wiki/excel/using-external-data-working-with-csv-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
