When you create a Microsoft Excel chart with a Datasheet view, Excel creates a query of the data in the Datasheet view, and then creates a chart based on the queried data.
Excel exports the Datasheet view as a Web query file.
If Excel is running when you click Chart with Excel, you are given the option to import the data in the Web query file into an existing worksheet, a new worksheet or a new workbook. Otherwise, Excel opens and imports the data into a new workbook. The imported data is displayed as a list in a worksheet and links the data with the information in SharePoint Foundation 2010. You are then prompted to create a chart using the Chart Wizard.