We help IT Professionals succeed at work.

import excel without having ms office on production server

hi all,
      i create a web site and deploy on production server.

production server configuration:
OS:server 2003 r2
.net framework 2.0
but no ms office.

In this web site functionality are:
1.import data from excel: is not working
2.nd export data from excel: is working

i have use Interop.Microsoft.Office.Interop.Excel.dll which is in bin folder and reference from this.

how can i import data from this file without having ms office on server.

below is error during read excel.

please give any idea.
thanks in advance.
sujan









Access to the path 'C:\Inetpub\wwwroot\CONTACMembership\ContactAdmin\import\JourneyClubMember.xls' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at System.Web.HttpPostedFile.SaveAs(String filename)
   at System.Web.UI.WebControls.FileUpload.SaveAs(String filename)
   at Admin_ImportExcelToDatabase.imgbtnimport_Click(Object sender, ImageClickEventArgs e)
11/06/2010 2:27:01 AM

Open in new window

Comment
Watch Question

Éric MoreauSenior .Net Consultant
Top Expert 2016

Commented:
your best bet is to use http://www.aspose.com/categories/.net-components/aspose.cells-for-.net/default.aspx

 Interop.Microsoft.Office.Interop.Excel.dll can only be used if Excel is fully installed on the server
Top Expert 2010

Commented:
You have mentioned import is not working; but export is working; does the export use the same Interop dll and runs in the server. if so that means ms office is available in the server...

Author

Commented:
thanks