473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Recursive data grab in Excel - C#

JamieHowarth0
533 Expert 512MB
Hi guys,

I have an ASP.NET form that I'm building which makes use of a File Upload.
Great news - the file upload is working (using a random GUID for filename to avoid collisions).
Not-so-great news - I have to connect to this uploaded file (either XLS or CSV) and retrieve data from it to display in a GridView on the page.
I've successfully connected to it using ODBC and I'm using the GetSchema method to try and retrieve the worksheets but I'm getting 0 results returned.
Has anyone come across this problem before, and if so, how do I fix it?

Code PM'd upon request (not comfortable posting in public forum due to nature).

Cheers,

codegecko
Dec 15 '08 #1
4 2102
JamieHowarth0
533 Expert 512MB
Thanks kenobewan for the link but I've already tried this one, OLEDB isn't available to me, I have to use an ODBC driver.
Dec 15 '08 #3
JamieHowarth0
533 Expert 512MB
Done it :-D

Turns out I was missing a couple of handy bits from my ODBC connection string - "Driver=790;DefaultDir=C:\PathToExcelFile;". This was stopping the ODBC driver from retrieving schema data.

I will produce an article on this at some stage to demonstrate how to manipulate Excel using ODBC (most examples demonstrate OLEDB only).

codegecko
Dec 15 '08 #4
kenobewan
4,871 Expert 4TB
Well done! Look forward to the article :-).
Dec 17 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: | last post by:
I'd want to make a custom class that will generate breadcrumb navigation for my site via a recursive query, e.g. Home > Page1 > Subpage 1. I've structured my database with hierarchical parent/child...
5
by: Jon Sagara | last post by:
Say that I have an Excel OWC on my Web page and I want to save any data the user has entered to the server when s/he clicks on the submit button. Is that possible? Thank you, -- Jon Sagara
1
by: Jo Blow | last post by:
Hi folks, I have a client that has a distributed access disaster that I want to move to a central ASP.NET system. I'm new to web services but is it possible to expose the raw database tables...
4
by: washoetech | last post by:
Hello, I am working on a project where I need to be able to grab the data from an Excel spreadsheet and create a new table in my database based on the columns in the spreadsheet. After the...
6
by: syvman | last post by:
Hi everyone... I am pulling my hair out trying to do this, and was wondering if someone could give me some assistance... I have an Excel spreadsheet containing several worksheets. I'd like to be...
6
by: Paul Wagstaff | last post by:
Happy new year...hope someone can help with this.. The nub of this problem is to populate 2 tables in a 1-M relationship from an imported Excel spreadsheet. The problem being that there is...
14
by: Takeadoe | last post by:
Folks, I at the proverbial fork in the road and before I make a decision, I was hoping maybe I could get some advice. I'm in the process of moving data to Access. I'd like to use Excel for...
4
by: lithoman | last post by:
I have been working with objects long enough to have the basics down, but some things give me fits, and this is one of them. Brief description: I have an airplane object, and each airplane has...
2
by: cyberdwarf | last post by:
Hi I need to pull data from an Excel worksheet to a data table, using Access & VBA. I am trying to use the "DoCmd.TransferSpreadsheet acImport" method, but... My problem is that the sheet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.