SSRS: Error while querying data from an Excel file (through ODBC)

喜夏-厌秋 提交于 2019-12-07 17:43:31

问题


I am trying to render a simple chart using SSRS. The data is in an Excel sheet. I have set up an user DSN and created a data source in SSRS using ODBC.

I am able to query the excel in Data tab. However while trying to preview, I get the following error:

error [hy000] [microsoft] [odbc excel driver] the connection for viewing your linked Microsoft Excel worksheet was lost.

Anyone knows why this is happening and how this can be solved?


回答1:


I would consider creating a SQL Sever Integration Services package to import the data from Excel to a SQL database and using the database as the data source for the report. The SSIS package could be scheduled to periodically refresh the data. Using a file based data source like Excel is vulnerable to people modifying the structure of the spreadsheet and moving, deleting or locking the file.




回答2:


Seems to be a fleeting error. I deleted the dataset, created a new one and re-ran again. It worked.



来源:https://stackoverflow.com/questions/411413/ssrs-error-while-querying-data-from-an-excel-file-through-odbc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!