473,804 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

To populate Excel sheet

Roy
Thanks for taking time to answer.I have a A2K application from which I
run series of Events by clicking few command buttons.This generates
queries,the result of which I copy and paste to worksheets in
Excel.There are 14-15 sheets which I populate manually.This I repeat
for 10-15 users.I use a Excel template which I copy and name it
according to the users and then populate.Is there a way to automate
this?I need to export these queries which are driven by the buttons
,open up the template and the corresponding worksheet.Is there a way to
insert rows based on the number of records in a query and then populate
,so that my formulas in the template are intact?Is this possible or too
tall a task?
Regards,

Roy

Nov 28 '05 #1
3 6985
did you look at the code here?
http://www.mvps.org/access/modules/mdl0035.htm

Nov 28 '05 #2
Roy
Thanks for the reply.What I am looking is to have a table containing
the names of the function procedures and in a click event of a button
read all these as a recordset and start exporting one by one.Someone
had posted similar approach to this problem here ,but i am unable to
locate the same. I already know how to transfer this using VBA but it
is not a elegant way.Also is there a way to fcalculate the number of
rows to be inserted based on the number of records?

Thanks

Roy

Nov 29 '05 #3
Roy:

This may be way off base, but perhaps it would be better to have your
Excel templates grab external data from your Access app rather than
pushing data from your app to Excel? If your queries are always stored
under the same names, use MS Query to grab the query in your Access app
as your external data source, and only use your code to update the
queries. In Excel, the External Data Range Properties allow you to
designate that formulas automatically fill down in columns adjacent to
data as well as give you several other fine-tuning options.

On another note, you say that you "run series of Events by clicking few
command buttons". You should be able to program everything into one
button if there is logic behind the sequence that you execute them.
You can reference other subs within the same module by simply calling
them. For instance, if you have
Private Sub MyFirstButton_C lick()
[Code for the first button]
End Sub

Private Sub MyNextButton_Cl ick()
[Code for the second button]
End Sub
in the same module, you can trigger the code for the next button in the
first button's code by calling it like this:
Private Sub MyFirstButton_C lick()
[All the original code for the first button]
MyNextButton_Cl ick
End Sub

Hope this helps,
Jana

Nov 29 '05 #4

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

Similar topics

13
35568
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy utility from my PythonWin (IDE from ActiveSTate),
0
2869
by: dgoel | last post by:
Hi, I Have a text file & I want to open it in excel sheet ( withou importing). I have written code for it, but it is not opening exce sheet. It opens the text file, but does not create a excel sheet populate it. I do not know what the problem is, can someone please hel out with this one, Here is my code: StreamReader dataFileReader = null; FileInfo file = null; Excel.Application ExcelObj = new Excel.Application();
12
3230
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is left running until my application closes. I have tried setting my Excel.Application object to Nothing. I have tried to then fore the GC into action using:
3
9929
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel (SP1) installed. The error is: System.Runtime.InteropServices.COMException(0x800A03EC): Exception from HRESULT: 0x800A03EC. at Microsoft.Office.Interop.Excel._Worksheet.Paste(Object Destination, Object Link) at...
3
13608
by: implicate_order | last post by:
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to find some place where I could look up a HOWTO doc/recipe to do that using either pyExcelerator or win32com.client. Could someone point me in the right direction? I'm at the stage where the spreadsheet and associated data worksheets
3
4853
by: pleaseexplaintome_2 | last post by:
using the code below (some parts not included), I create a new excel workbook with spreadheets. I then want to delete a spreadsheet, but a reference remains open and excel stays in task manager when the code highlighted below is used. can someone help me identify what object remains open and how to release that reference? thanks using Excel = Microsoft.Office.Interop.Excel;
13
3016
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then the process does not end. So I feel confident the problem occurrs here. It appears another reference is created that needs to be closed. Can anyone tell me how to do this? :) Thank you Excel.Workbook workbook =
0
1274
by: Padma Athimoolam | last post by:
Hi, I am new to VB and XML.I want to populate XML Values in Excel Sheet.My Sample XML is <?xml version="1.0" encoding="UTF-8" ?> - <workbook> - <worksheet name="Scorecard_KTC_MW"> <cell name="E9" formula="=sum(G9,I9,K9)" type="text" /> <cell name="E11" formula="=sum(G11,I11,K11)" type="Number" comment="Sample Help" /> <cell name="E13" formula="=sum(G13,I13,K13)" type="General" /> <cell name="G9" value="0" type="text" />
2
6425
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the method.... it creates 6 sheets # region Namespaces using System;
0
9708
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9587
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9161
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7623
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5527
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.