borderAndreaVB free resources for Visual Basic developersborder

ASP.NET 3.5 Hosting - Click Here

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (Using Outlook in Access VBA) New Topic New Poll Post Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : How to Create Report in Excel
Poster Message
chintu4uin
Level: Graduate

Registered: 04-02-2008
Posts: 11

icon How to Create Report in Excel

H frds please help me...
I have to create a report in Excel from VB6.0 and my DB is SQL. The Report Format is as such Attach.
In tht the percentage column and total column will be calculte in Excel itself. i.e even if user change the data in Excel then simultaneously total & percentage shld be change as per Data.
How to do so..The Headings mark in Bold are dynamic tht's it will change according to the change in Financial Year..

____________________________
Attached:
udgetPresentationWorkSheet.zip 3 KB (Downloads: 2)

13-02-2008 at 01:25 PM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 1009
icon Re: How to Create Report in Excel

Hi
What research have you done?
Why are you using VB, why not pure VBA (Excel macros)?
Can you explain why you are not using formulae in the cells? (Excel does this calculations, you know).

In my experience, users don't need 2-way communication with excel and sql very often - it's mostly read from sql and create a spreadsheet.
Why not get external data from sql into a new worksheet, and record a macro to insert the data where you want it?
Then the user can trigger the macro whenever they want.
Kieron


____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

16-02-2008 at 02:39 AM
View Profile Send Email to User Show All Posts | Quote Reply
chintu4uin
Level: Graduate

Registered: 04-02-2008
Posts: 11
icon Re: How to Create Report in Excel

Hi stickleprojects thx for reply.
I hav developed a system in which my user wants a report named Budget Preparation in which he will get the item sell dat of 3 yrs and on the basis of it he will prepare a target of item to be sell in next financial yr.
As I dont no much abt Excel so, I know how to send data frm SQL with Query to Excel using :-
insert into openrowset......query, but in this case the column headings in Excel and SQL shld match thn only it works else it want..
But I need the Report in a formated way .i.e  as per attach file so I m not getting how to do so.I hav no idea abt macro also.

16-02-2008 at 06:59 AM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 1009
icon Re: How to Create Report in Excel

Look in the help under Get External Data. This will pull the data from sql into excel, rather than push from sql to a new excel file.
As you have no idea about macros, look into them.
What version of excel is this targetted at?

____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

16-02-2008 at 10:14 AM
View Profile Send Email to User Show All Posts | Quote Reply
chintu4uin
Level: Graduate

Registered: 04-02-2008
Posts: 11
icon Re: How to Create Report in Excel

Please give u r further Guidenace frd's for my post ..
http://www.andreavb.com/forum/viewtopic_8141.html

01-03-2008 at 06:19 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VBA (Access, Excel, Word, ...) : How to Create Report in Excel
Next Topic (Using Outlook in Access VBA) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Lei e Lui - il portale | Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder