473,387 Members | 1,569 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.

How to use TransferSpreadsheet to transfer query data to Excel Template selected rows

Hi Team,

This is the code i am using to transfer data to a excel template, the data is pasted from cell A1. i wanted the data transferred from row 11 and onward.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Command18_Click()
  3. Dim filepath As String
  4. Dim sSheetName As String
  6. sSheetName = InputBox("Enter Sheet Name")
  7. filepath = "C:\Users\msheikh\Documents\Fremont Maintenance Support\DB\CSP_Template.xlsx"
  8. DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "CSP_Data_Query", filepath, True, sSheetName
  11. MsgBox (" CSP Data is Successfully Exported ")
  14. End Sub
Sep 16 '22 #1
0 10061

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

Similar topics

by: sweeney_jones | last post by:
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....
by: Tim Kelley | last post by:
I have a dataviewgrid in my project which the user will select multiple rows. They will click a button and my program will perform some operation on the selected rows. My question is, how do I...
by: Simon | last post by:
Dear reader, With the export command you can export a query to Excel. By activate this command a form pop's up with the following text:
by: fanoftvb | last post by:
Hi, i currently has this code. When on click on the "Approve" button, the database of all the rows will change. I have "Approve" button on every row. How do i make it so that only the selected rows...
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...
by: Widge | last post by:
I have an Excel template that has to be populated with data each month. It has to be a this particular template because it has several functions embedded into it which are for a bespoke accounting...
by: pkj7461 | last post by:
Hi, I was using Docmd.Transferspreadsheet to to populate query data in Excel. My code so far Dim xlApp As Excel.Application Dim xlWb As Excel.workbook Dim xlWs As Excel.Worksheet Set x1App =...
by: Comandur | last post by:
Hi, I am trying to export an access query to excel. I have made use of transferspreadsheet command to achive this. However i have hardcoded the path and the filename in the VBA code. I am not sure...
by: RobT | last post by:
My project is moving along smoothly- I've gotten a lot of info from this forum. One thread that helped me understand what I was doing is here. But I have a question I can't find an answer to. My...
by: bluenose83 | last post by:
Hi Guys, really no idea about VBA code but I trying to learn. I have a database which I am trying to set up to replace a number of existing excel documents. I do however need the database to...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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$) { } ...
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...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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...
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,...

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.