Question: I need to Implement the classes Point and Line
The toString method of Point Should print a point in the form (x,y) 
The toString method of Line Should print a point in the form (x1,y1)->(x2,y2)

Then I need to create a Class called LineApp
in the main do the following:
Create a Line with the points (0,0) and (4,3)
Then calculate and display the length of the line.

I have been looking at this and have no clue what to do

Answer: 
You can create a DataTable from the DataView returned by the SqlDataSource and export that to Excel. The resulting DataTable will contain all the columns.

Example:

```
DataTable dt = ((DataView) this.sqldatasource.Select(DataSourceSelectArguments.Empty)).ToTable();

```

Now take this DataTable and export that. [Google export DataTable to Excel.](https://www.google.com/search?q=Export%20DataTable%20to%20Excel&aq=f&oq=export%20d&aqs=chrome.0.59j0j57j5j60j61.3249j0&sourceid=chrome&ie=UTF-8)

If you are fine with using third-party libraries, look into [EPPLUS](http://epplus.codeplex.com/). You can export a DataTable to Excel in, literally, 2 lines of code. The rest would be the code to set the headers and flush the Response.

Here's an example: <http://epplus.codeplex.com/wikipage?title=WebapplicationExample>
I prefer to use CSV rather than excel for plain data, but the new version of Excel does have the advantage of compression. 

You can use the [OpenXMLSDK](http://lateral8.com/articles/2010/3/5/openxml-sdk-20-export-a-datatable-to-excel.aspx) to directly export to XLSX or the [FileHelpers](http://www.codeproject.com/Articles/12170/FileHelpers-v2-0-Delimited-CSV-or-Fixed-Data-Impor) library to export to CSV.