?
Solved

export dataset

Posted on 2008-06-13
5
Medium Priority
?
225 Views
Last Modified: 2010-04-23
i have a dataset that has two tables with a relationship defined between the two. Is there a way to export this to excel keeping the relationship so it would display in a subtotal format

This is for a web app

Thank you
0
Comment
Question by:jimseiwert
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 27

Expert Comment

by:VBRocks
ID: 21780823
DataSet.WriteXML()

0
 
LVL 2

Author Comment

by:jimseiwert
ID: 21780883
so how does that work with excel?
0
 
LVL 27

Accepted Solution

by:
VBRocks earned 2000 total points
ID: 21781016
I'm so sorry.  I totally spaced it and stopped reading after "export", and didn't event catch "excel".  ;)

I don't know the answer to that.

What are you looking for as far as a "subtotal format"?

You can loop through each row of the parent DataTable, and call the row's GetChildRows(relationName)
method to retrieve all of the related rows, then write the Parent row, and each child row to Excel.

So it would (basically) be something like this in Excel:

parent row 1
     child row 1
     child row 2
     child row 3

parent row 2
     child row 1
     child row 2
     child row 3

etc...

Is that what you are referring to, or did you have something else in mind?

0
 
LVL 2

Author Comment

by:jimseiwert
ID: 21781054
no that is the format i was looking for, just need to do the code now, i will let you know how it works. If you have any examples that would be great
0
 
LVL 27

Assisted Solution

by:VBRocks
VBRocks earned 2000 total points
ID: 21781361
Take a look at the following link.  I think it will be of help to you:

    http://p2p.wrox.com/topic.asp?TOPIC_ID=31161

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

771 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