473,387 Members | 3,787 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,387 software developers and data experts.

Export datagrid to Excel template, transpose ?

Hi,

I am really struggling to figure out how to do this.

I have a SQL view that contains 3 columns and upto 4000 rows. This is a
series of question numbers and answers for a questionnaire. There are
40 questions in the questionnaire, answers of 1 - 8, 100 participants.
The 3 columns are . .

QlineID - Indicates the line item id, this will repeat 40 times and
relates to the questionnaire title and user.
Question - Gives the question number (1 - 40)
Answer - Gives the answer for this question from this user for this
questionnaire ! (1 - 8)

So, I can load this into a dataset/grid/table and show it at runtime to
the users, but it is no good for analysis. What I need to do is give a
button, so that this data can be exported to a predefined XL template
that performs analysis and charts results.

Thats my first problem, getting it into Excel. Ideally I would like to
launch XL client side and prompt for a filename to save. Or could I
save it as HTML then load it back into the browser ?

My next issue is that the Excel template expects the data in a
different layout, almost transposed. The columns titles range from 1 -
40 and relate to the question numbers, there is then a row for each
QLineID with the answer recorded against it. So I would have 100 rows,
each with 40 answers in order. I now have data that can be easily
reported.

Thats my 2nd problem, transposing the data.

I've read lots about this subject, but can't see a way forward. Hold
the data in a multidimensional array then dump that to XL, create CSV /
XML data.

Can anybody give some advice on this please ?

Nov 19 '05 #1
0 2483

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rob | last post by:
I was looking for the easiest way to take a datagrid full of data including two template columns, and export the contents of the grid into Excel by giving an "open or save as" box. I came across...
8
by: DC Gringo | last post by:
I have a simple button that should open another window and export a datagrid to an Excel file. I'm getting: "Name 'window' is not declared." What do I need to declare or import? <INPUT...
3
by: Bidarkota | last post by:
When i export DataGrid to Excel all the HTML contents are also exporting to excel. i am using stylesheets in the ASPX Page and i am getting an alert message that stylesheets are missing. i need to...
1
by: Sen | last post by:
Hi, i want to export data from a datagrid to excel sheet. I'm able to do it using RenderControl method of the datagrid. But i do not have any control over the column width of excel sheet. Is...
0
by: kieran | last post by:
Hi, I have an 'export to excel' button on my Datagrid. All works well except that on my Datagrid, I have sub total rows. The subtotal rows use colspan so that the subtotals are given above...
6
by: Sridhar | last post by:
Hi, I have to export data inside the datagrid into an excel worksheet. I have to do this on button click event. I am trying to do like this. First get the DataTable from the datagrid and...
3
by: Hamilton Woods | last post by:
Diehards, I developed a template matrix class back around 1992 using Borland C++ 4.5 (ancestor of C++ Builder) and haven't touched it until a few days ago. I pulled it from the freezer and...
1
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
5
by: Reggie | last post by:
Hi and TIA! I have an export procedure that exports my data from my datagrids to excel. The problem is that I lose leading zero's cause excel removes them and doesn't treat them as text. Is it...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.