[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I process an excel file on a server farm (shared server).

Posted on 2012-08-24
4
Medium Priority
?
898 Views
Last Modified: 2012-10-30
I've got a ASP .NET [C#] 3.5 web application written that lives on a server farm, (shared server). So, i've got an excel file (.xls) that i have to process, that lives in the file directory structure of my application on this same shared server / server farm. On my local machine i use:

using Excel = Microsoft.Office.Interop.Excel;

in my C# file (referencing the appropriate .dll file) and in my web config file"

<add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" />

and that works great when in my code behind i use:

OleDbConnection _con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @"C:\Data\myExcelFile.xls;Extended Properties=Excel 12.0;");

_con.Open();

however, in the shared server / server farm environment this does no good as i would need to register that .dll file on that shared server / server farm and this is not do-able as the owners of this shared server / server farm environment (GoDaddy) aren't goin to give me access to do this.

so my question is: Is there another way to process an excel file in this type of environment, with out the excel .dll?
0
Comment
Question by:Michael Sterling
  • 2
4 Comments
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 1000 total points
ID: 38333184
You don't need the interop library for OLEDB access:

<add assembly="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C" />

That library is only for opening, and manipulating Excel files as spreadsheets, and has nothing to do with OLEDB.
0
 
LVL 1

Author Comment

by:Michael Sterling
ID: 38333209
@TheLearnedOne: ok so then how do i process the excel spreadsheet? Are there examples some where?
0
 
LVL 18

Accepted Solution

by:
Gary Davis earned 1000 total points
ID: 38335008
Look at the NuGet package LinqToExcel for a non-interop way of reading/writing an excel file.

http://code.google.com/p/linqtoexcel/

Gary Davis
0
 
LVL 1

Author Closing Comment

by:Michael Sterling
ID: 38549447
thank you
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
Screencast - Getting to Know the Pipeline
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question