Last post Nov 01, 2010 03:34 AM by malek.safa
Jan 24, 2008 04:27 AM|ArjunAtPSL|LINK
My ASP.Net application has to read an Excel file(.xls).One best way to get it done is by using OLEDB connection.
But in my case, the application is hosted on a shared environment which allows only "Medium" trust application to run.But "Medium" trust does not allow OLEDB connections.So is there a way i can read the Excel file without using OLEDB connections.
Thanks in advance,
Jan 24, 2008 05:16 AM|siva_sm|LINK
You may consider 3rd party tools such as Aspose.Cells, ComponentOne XLS for .NET
Jan 24, 2008 06:18 AM|ArjunAtPSL|LINK
Thnkx for the prompt reply.
But these third party tools would be using OLEDB connection internally. So it would not work in "Medium" trust environment.
Is there a class like system.io.packaging in asp.net 2.0 to read open XML formats?
Jan 24, 2008 06:28 AM|siva_sm|LINK
You can use System.IO.Packaging (after installing .NET 3.0) in ASP.NET 2.0, if that fulfills your needs.
Oct 25, 2010 07:50 AM|jackbaker|LINK
I tried Excel Reader .NET from devtriogroup.com. I used it in application on godaddy server with Medium Trust level.
It easy in use with plain API functions.
excel read asp.net c# medium trust
Nov 01, 2010 03:34 AM|malek.safa|LINK
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet
xlApp = New Excel.Application
xlWorkBook = xlApp.Workbooks.Open(".../xxx/xxx.xlsx.")
xlWorkSheet = xlWorkBook.Worksheets("Sheet1")
xlWorkSheet.Cells(2, 2) = "sdsdsdsdsdsd"
Private Sub releaseObject(ByVal obj As Object)
obj = Nothing
Catch ex As Exception
obj = Nothing
'make sure to add excel reference to your project