LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.dotnet.languages.csharp,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Import Excel data with .NET

http://www.sqlservercentral.com/colu...ataimports.asp

I think that will help. Its a KB I did a while back.




"Phil" wrote in message
...
Hi,
I am new in visual studio, and currently using ASP .net to do some of my
design. I have a similar question, I need to be able to have my pages ask

for
an excel file, and automatically populate the data into a dataset. The

excel
file used as an input should have a pretty set layout, so all i need is a

way
to :

1. Refer to the excel file. (aspx page requests for the excel file to be
inputted by the user)
2. Read each cell.
3. Populate my dataset in the aspx page.

However, since i have no experience whatsoever in excel either, i am not
exactly sure where to begin.

"Basically, you should set a reference to the Microsoft Office Primary
Interop Assemblies in your project"

Currently this is all greek to me. It would be very helpful if you can
perhaps point me to any documentations that i should be reading that is
related to what i am trying to do. Also, a lot of my searches with

keywords
such as "importing excel to asp visual studio" comes more often than not

with
pages on exporting. Perhaps i should be looking with a more specific

keyword?

Thanks in advance,
Phil





"Nicholas Paldino [.NET/C# MVP]" wrote:

Niklas,

There is really no need for such a thing really. You can use the

Excel
automation model to access the sheet directly and then get the values in
those sheets/cells.

Basically, you should set a reference to the Microsoft Office

Primary
Interop Assemblies in your project.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
-

"Niklas" wrote in message
...
Hi

Before I start coding I need to be sure that nobody else has not done

it
yet
and that I can use it.

I need an import utility which import data from Excel to a database or
some
object in .NET. The data in Excel is not in structured columns but can
exist
everywhere in the workbook. For example if I am supposed to import a
person
and all his/her cars which exist in a workbook I want to be able to

create
an
import protocol and specify that the first name exist in cell

Sheet1!C4,
the
last name in Sheet1!F4, telephone in Sheet1!E10 and all cars in in

column
Sheet2!B4. The resulting table to a database could look something like
this

Agnes|Carlsson|123456|Subaru
Agnes|Carlsson|123456|Volvo
Agnes|Carlsson|123456|Ford

Are their any Open Source projects, Frameworks and/or components which

I
can
use or have a look at?

Regards
/Niklas






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
import XML data...Is there a size limit on the import? MatthewG Excel Discussion (Misc queries) 0 February 10th 09 05:57 PM
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
Import external data, data includes Excel function allen davidson Excel Worksheet Functions 0 July 4th 08 12:39 PM
import data into excel Curioushead Excel Discussion (Misc queries) 0 February 21st 07 08:49 PM
how to Import data in excel office2003 with data more 65000 rows Abhijit Excel Worksheet Functions 1 May 13th 05 05:12 AM


All times are GMT +1. The time now is 02:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"